From owner-cvs-all Fri May 4 10:15:23 2001 Delivered-To: cvs-all@freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 6B86737B423; Fri, 4 May 2001 10:15:17 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f44HFHE49956; Fri, 4 May 2001 10:15:17 -0700 (PDT) (envelope-from jhb) Message-Id: <200105041715.f44HFHE49956@freefall.freebsd.org> From: John Baldwin Date: Fri, 4 May 2001 10:15:17 -0700 (PDT) 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 X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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