Date: 08 Nov 1999 04:37:24 +0100 From: Assar Westerlund <assar@sics.se> To: freebsd-hackers@FreeBSD.ORG Subject: SIMPLELOCK_DEBUG and apause Message-ID: <5lyac9d56z.fsf@assaris.sics.se>
next in thread | raw e-mail | index | archive | help
Why trying to debug some locking code of my own I enabled SIMPLELOCK_DEBUG, only to find out that I was getting lots of `simple_unlock: lock not held' in lockmgr -> acquire -> apause. Looking closer at `apause' it seems rather clear that it can cause this. I proposed simple change is below. Comments? /assar --- kern_lock.c.orig Mon Nov 8 03:55:26 1999 +++ kern_lock.c Mon Nov 8 04:24:13 1999 @@ -116,9 +119,11 @@ simple_lock(&lkp->lk_interlock); if ((lkp->lk_flags & flags) == 0) return 0; + simple_unlock(&lkp->lk_interlock); break; } } + simple_lock(&lkp->lk_interlock); } return 1; } To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5lyac9d56z.fsf>