# HG changeset patch # User Josef 'Jeff' Sipek # Date 1565539602 14400 # Node ID bc8880710efd7ed00c821bd848a542bd7c43fa82 # Parent 12a0b515e84e8e0a19e95fdb25311a3be929f609 synch: keep track of rwlocks in the dependency graph Signed-off-by: Josef 'Jeff' Sipek diff -r 12a0b515e84e -r bc8880710efd synch.c --- a/synch.c Sun Aug 11 12:05:50 2019 -0400 +++ b/synch.c Sun Aug 11 12:06:42 2019 -0400 @@ -609,6 +609,7 @@ print_invalid_call("RWDESTROY", where); check_magic(&l->info, "destroy", where, SYNCH_TYPE_RW); + check_unheld_for_destroy(&l->info, where); l->info.magic = DESTROYED_MAGIC; /* keep the synch type set to aid debugging */ @@ -621,6 +622,7 @@ print_invalid_call("RWLOCK", where); check_magic(&l->info, "acquire", where, SYNCH_TYPE_RW); + check_unheld_for_lock(&l->info, where); } static void verify_rw_unlock(const struct lock_context *where, struct rwlock *l) @@ -629,6 +631,7 @@ print_invalid_call("RWUNLOCK", where); check_magic(&l->info, "release", where, SYNCH_TYPE_RW); + check_held_for_unlock(&l->info, where); } static void verify_cond_init(const struct lock_context *where, struct cond *c)