summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/kern/kern_lock.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/kern/kern_lock.c b/sys/kern/kern_lock.c
index 9265763..11237c0 100644
--- a/sys/kern/kern_lock.c
+++ b/sys/kern/kern_lock.c
@@ -46,10 +46,9 @@
#include <sys/kernel.h>
#include <sys/lock.h>
#include <sys/malloc.h>
+#include <sys/mutex.h>
#include <sys/systm.h>
-#include <machine/mutex.h>
-
/*
* Locking primitives implementation.
* Locks provide shared/exclusive sychronization.
@@ -81,7 +80,7 @@
extern int lock_nmtx;
int lock_mtx_selector;
struct mtx *lock_mtx_array;
-struct mtx lock_mtx;
+MUTEX_DECLARE(static, lock_mtx);
static int acquire(struct lock *lkp, int extflags, int wanted);
static int apause(struct lock *lkp, int flags);
@@ -99,7 +98,7 @@ lockmgr_init(void *dummy __unused)
* initialized in a call to lockinit().
*/
if (lock_mtx_selector == 0)
- mtx_init(&lock_mtx, "lockmgr", MTX_DEF);
+ mtx_init(&lock_mtx, "lockmgr", MTX_DEF | MTX_COLD);
else {
/*
* This is necessary if (lock_nmtx == 1) and doesn't hurt
@@ -550,7 +549,7 @@ lockinit(lkp, prio, wmesg, timo, flags)
* so there's no reason to protect modification of
* lock_mtx_selector or lock_mtx.
*/
- mtx_init(&lock_mtx, "lockmgr", MTX_DEF);
+ mtx_init(&lock_mtx, "lockmgr", MTX_DEF | MTX_COLD);
lock_mtx_selector = 1;
}
lkp->lk_interlock = &lock_mtx;
OpenPOWER on IntegriCloud