summaryrefslogtreecommitdiffstats
path: root/sys/vm/uma_int.h
diff options
context:
space:
mode:
authorjeff <jeff@FreeBSD.org>2002-03-27 09:23:41 +0000
committerjeff <jeff@FreeBSD.org>2002-03-27 09:23:41 +0000
commitdff418f166b9e0d1e38094ab3bb7b6a6812ec6bb (patch)
tree881b84f9e9297329d00cba858d3818a9c74d2de5 /sys/vm/uma_int.h
parent7fa55182e276dd9bbdaa9c61a231e896a5335804 (diff)
downloadFreeBSD-src-dff418f166b9e0d1e38094ab3bb7b6a6812ec6bb.zip
FreeBSD-src-dff418f166b9e0d1e38094ab3bb7b6a6812ec6bb.tar.gz
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
Diffstat (limited to 'sys/vm/uma_int.h')
-rw-r--r--sys/vm/uma_int.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/vm/uma_int.h b/sys/vm/uma_int.h
index 77e7c38..ffb8603 100644
--- a/sys/vm/uma_int.h
+++ b/sys/vm/uma_int.h
@@ -287,7 +287,7 @@ void uma_large_free(uma_slab_t slab);
#define ZONE_UNLOCK(z) mtx_unlock(&(z)->uz_lock)
#define CPU_LOCK_INIT(z, cpu) \
- mtx_init(&(z)->uz_cpu[(cpu)].uc_lock, (z)->uz_lname, MTX_DEF)
+ mtx_init(&(z)->uz_cpu[(cpu)].uc_lock, (z)->uz_lname, MTX_DUPOK|MTX_DEF)
#define CPU_LOCK_FINI(z, cpu) \
mtx_destroy(&(z)->uz_cpu[(cpu)].uc_lock)
OpenPOWER on IntegriCloud