Mercurial > libjeffpc
changeset 779:5afe57ee2dea
synch: print held synch objects generically
Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
author | Josef 'Jeff' Sipek <jeffpc@josefsipek.net> |
---|---|
date | Sun, 11 Aug 2019 13:13:57 -0400 |
parents | 1b8e4069b32f |
children | 12a0b515e84e |
files | synch.c |
diffstat | 1 files changed, 4 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/synch.c Sun Aug 11 13:12:59 2019 -0400 +++ b/synch.c Sun Aug 11 13:13:57 2019 -0400 @@ -142,13 +142,6 @@ where->line); } -#define GENERATE_LOCK_MASK_ARGS(i) \ - ((i)->magic != (uintptr_t) (i)) ? 'M' : '.' -#define GENERATE_RW_MASK_ARGS(l) \ - ((l)->info.magic != (uintptr_t) &(l)->info) ? 'M' : '.' -#define GENERATE_COND_MASK_ARGS(c) \ - ((c)->info.magic != (uintptr_t) &(c)->info) ? 'M' : '.' - static void print_synch_as(struct lock_info *info, const struct lock_context *where, enum synch_type type) @@ -198,11 +191,13 @@ for_each_held_lock(i, cur) { struct lock_info *info = cur->info; struct lock *lock = container_of(info, struct lock, info); + char synch_chars[2]; - cmn_err(CE_CRIT, "lockdep: %s #%zd: %s (%p) <%c> acquired at %s:%d", + cmn_err(CE_CRIT, "lockdep: %s #%zd: %s (%p) %s <%s> acquired at %s:%d", (cur == highlight) ? "->" : " ", i, info->name, lock, - GENERATE_LOCK_MASK_ARGS(info), + synch_type_str(info->type), + get_synch_chars(info, synch_chars), cur->where.file, cur->where.line); } }