diff options
author | jeff <jeff@FreeBSD.org> | 2002-03-27 09:23:41 +0000 |
---|---|---|
committer | jeff <jeff@FreeBSD.org> | 2002-03-27 09:23:41 +0000 |
commit | dff418f166b9e0d1e38094ab3bb7b6a6812ec6bb (patch) | |
tree | 881b84f9e9297329d00cba858d3818a9c74d2de5 /sys/powerpc | |
parent | 7fa55182e276dd9bbdaa9c61a231e896a5335804 (diff) | |
download | FreeBSD-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/powerpc')
-rw-r--r-- | sys/powerpc/aim/machdep.c | 2 | ||||
-rw-r--r-- | sys/powerpc/powerpc/machdep.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sys/powerpc/aim/machdep.c b/sys/powerpc/aim/machdep.c index 654c566..e078d12 100644 --- a/sys/powerpc/aim/machdep.c +++ b/sys/powerpc/aim/machdep.c @@ -392,7 +392,7 @@ powerpc_init(u_int startkernel, u_int endkernel, u_int basekernel, char *args) */ mtx_init(&sched_lock, "sched lock", MTX_SPIN | MTX_RECURSE); mtx_init(&Giant, "Giant", MTX_DEF | MTX_RECURSE); - mtx_init(&proc0.p_mtx, "process lock", MTX_DEF); + mtx_init(&proc0.p_mtx, "process lock", MTX_DEF|MTX_DUPOK); mtx_lock(&Giant); /* diff --git a/sys/powerpc/powerpc/machdep.c b/sys/powerpc/powerpc/machdep.c index 654c566..e078d12 100644 --- a/sys/powerpc/powerpc/machdep.c +++ b/sys/powerpc/powerpc/machdep.c @@ -392,7 +392,7 @@ powerpc_init(u_int startkernel, u_int endkernel, u_int basekernel, char *args) */ mtx_init(&sched_lock, "sched lock", MTX_SPIN | MTX_RECURSE); mtx_init(&Giant, "Giant", MTX_DEF | MTX_RECURSE); - mtx_init(&proc0.p_mtx, "process lock", MTX_DEF); + mtx_init(&proc0.p_mtx, "process lock", MTX_DEF|MTX_DUPOK); mtx_lock(&Giant); /* |