Mercurial > libjeffpc
changeset 781:bc8880710efd
synch: keep track of rwlocks in the dependency graph
Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
author | Josef 'Jeff' Sipek <jeffpc@josefsipek.net> |
---|---|
date | Sun, 11 Aug 2019 12:06:42 -0400 |
parents | 12a0b515e84e |
children | d83ac58d2500 |
files | synch.c |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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)