diff options
author | truckman <truckman@FreeBSD.org> | 2003-07-13 01:22:21 +0000 |
---|---|---|
committer | truckman <truckman@FreeBSD.org> | 2003-07-13 01:22:21 +0000 |
commit | f98596512043a2b2e8207da073f085954bc223a9 (patch) | |
tree | 717b3d174838551975ecc8e26f0d8c55fe89302c /sys/kern/kern_prot.c | |
parent | d62f9caa290ab53c0c790392fb7353144dddceff (diff) | |
download | FreeBSD-src-f98596512043a2b2e8207da073f085954bc223a9.zip FreeBSD-src-f98596512043a2b2e8207da073f085954bc223a9.tar.gz |
Extend the mutex pool implementation to permit the creation and use of
multiple mutex pools with different options and sizes. Mutex pools can
be created with either the default sleep mutexes or with spin mutexes.
A dynamically created mutex pool can now be destroyed if it is no longer
needed.
Create two pools by default, one that matches the existing pool that
uses the MTX_NOWITNESS option that should be used for building higher
level locks, and a new pool with witness checking enabled.
Modify the users of the existing mutex pool to use the appropriate pool
in the new implementation.
Reviewed by: jhb
Diffstat (limited to 'sys/kern/kern_prot.c')
-rw-r--r-- | sys/kern/kern_prot.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 848b82c..47f2321 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -1652,7 +1652,7 @@ crget(void) MALLOC(cr, struct ucred *, sizeof(*cr), M_CRED, M_WAITOK | M_ZERO); cr->cr_ref = 1; - cr->cr_mtxp = mtx_pool_find(cr); + cr->cr_mtxp = mtx_pool_find(mtxpool_sleep, cr); #ifdef MAC mac_init_cred(cr); #endif |