Mercurial > libjeffpc
changeset 770:8f41dc0ec42e
synch: error_lock already gets the expected synch type via info struct
Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
author | Josef 'Jeff' Sipek <jeffpc@josefsipek.net> |
---|---|
date | Sun, 11 Aug 2019 11:49:56 -0400 |
parents | c088e20c4505 |
children | 01848cbed620 |
files | synch.c |
diffstat | 1 files changed, 2 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/synch.c Thu Jul 25 14:13:06 2019 -0400 +++ b/synch.c Sun Aug 11 11:49:56 2019 -0400 @@ -239,7 +239,6 @@ } static void error_lock(struct held_lock *held, struct lock_info *new, - enum synch_type new_type, const struct lock_context *where) { const bool deadlock = (new == held->info); @@ -250,7 +249,7 @@ cmn_err(CE_CRIT, "lockdep: possible recursive locking detected"); cmn_err(CE_CRIT, "lockdep: thread is trying to acquire:"); - print_synch_as(new, where, new_type); + print_synch_as(new, where, new->type); if (deadlock) cmn_err(CE_CRIT, "lockdep: but the thread is already " @@ -553,7 +552,7 @@ if (held->info == &l->info) sanity_check_held_synch_type(held, SYNCH_TYPE_MUTEX); - error_lock(held, &l->info, SYNCH_TYPE_MUTEX, where); + error_lock(held, &l->info, where); return; }