From dff418f166b9e0d1e38094ab3bb7b6a6812ec6bb Mon Sep 17 00:00:00 2001 From: jeff Date: Wed, 27 Mar 2002 09:23:41 +0000 Subject: Add a new mtx_init option "MTX_DUPOK" which allows duplicate acquires of locks with this flag. Remove the dup_list and dup_ok code from subr_witness. Now we just check for the flag instead of doing string compares. Also, switch the process lock, process group lock, and uma per cpu locks over to this interface. The original mechanism did not work well for uma because per cpu lock names are unique to each zone. Approved by: jhb --- sys/sys/lock.h | 1 + 1 file changed, 1 insertion(+) (limited to 'sys/sys/lock.h') diff --git a/sys/sys/lock.h b/sys/sys/lock.h index 425a6e9..a55bf54 100644 --- a/sys/sys/lock.h +++ b/sys/sys/lock.h @@ -69,6 +69,7 @@ struct lock_class { #define LO_RECURSABLE 0x00080000 /* Lock may recurse. */ #define LO_SLEEPABLE 0x00100000 /* Lock may be held while sleeping. */ #define LO_UPGRADABLE 0x00200000 /* Lock may be upgraded/downgraded. */ +#define LO_DUPOK 0x00400000 /* Don't check for duplicate acquires */ #define LI_RECURSEMASK 0x0000ffff /* Recursion depth of lock instance. */ #define LI_SLEPT 0x00010000 /* Lock instance has been slept with. */ -- cgit v1.1