summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_descrip.c
diff options
context:
space:
mode:
authortruckman <truckman@FreeBSD.org>2003-07-13 01:22:21 +0000
committertruckman <truckman@FreeBSD.org>2003-07-13 01:22:21 +0000
commitf98596512043a2b2e8207da073f085954bc223a9 (patch)
tree717b3d174838551975ecc8e26f0d8c55fe89302c /sys/kern/kern_descrip.c
parentd62f9caa290ab53c0c790392fb7353144dddceff (diff)
downloadFreeBSD-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_descrip.c')
-rw-r--r--sys/kern/kern_descrip.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c
index 43cbe5c..acda3f3 100644
--- a/sys/kern/kern_descrip.c
+++ b/sys/kern/kern_descrip.c
@@ -1209,7 +1209,7 @@ falloc(td, resultfp, resultfd)
* descriptor to the list of open files at that point, otherwise
* put it at the front of the list of open files.
*/
- fp->f_mtxp = mtx_pool_alloc();
+ fp->f_mtxp = mtx_pool_alloc(mtxpool_sleep);
fp->f_count = 1;
fp->f_cred = crhold(td->td_ucred);
fp->f_ops = &badfileops;
OpenPOWER on IntegriCloud