Date: Fri, 4 May 2001 10:15:17 -0700 (PDT) From: John Baldwin <jhb@FreeBSD.org> To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/kern kern_mutex.c kern_sx.c subr_witness.c src/sys/sys _lock.h lock.h mutex.h Message-ID: <200105041715.f44HFHE49956@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
jhb 2001/05/04 10:15:17 PDT Modified files: sys/kern kern_mutex.c kern_sx.c subr_witness.c sys/sys _lock.h lock.h mutex.h Log: - Move state about lock objects out of struct lock_object and into a new struct lock_instance that is stored in the per-process and per-CPU lock lists. Previously, the lock lists just kept a pointer to each lock held. That pointer is now replaced by a lock instance which contains a pointer to the lock object, the file and line of the last acquisition of a lock, and various flags about a lock including its recursion count. - If we sleep while holding a sleepable lock, then mark that lock instance as having slept and ignore any lock order violations that occur while acquiring Giant when we wake up with slept locks. This is ok because of Giant's special nature. - Allow witness to differentiate between shared and exclusive locks and unlocks of a lock. Witness will now detect the case when a lock is acquired first in one mode and then in another. Mutexes are always locked and unlocked exclusively. Witness will also now detect the case where a process attempts to unlock a shared lock while holding an exclusive lock and vice versa. - Fix a bug in the lock list implementation where we used the wrong constant to detect the case where a lock list entry was full. Revision Changes Path 1.63 +5 -40 src/sys/kern/kern_mutex.c 1.5 +4 -28 src/sys/kern/kern_sx.c 1.70 +191 -90 src/sys/kern/subr_witness.c 1.2 +1 -3 src/sys/sys/_lock.h 1.31 +21 -5 src/sys/sys/lock.h 1.31 +11 -23 src/sys/sys/mutex.h To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200105041715.f44HFHE49956>