diff options
author | jasone <jasone@FreeBSD.org> | 2001-01-21 07:52:20 +0000 |
---|---|---|
committer | jasone <jasone@FreeBSD.org> | 2001-01-21 07:52:20 +0000 |
commit | 24d53563ed2aafc4622e310d16018cbbd0c95388 (patch) | |
tree | 0ed4cd8e7aa2e3a663ed7f62261fe70082bc423c /sys/kern/kern_lock.c | |
parent | db586afb8bf54fe67c82b3bd5e80f1c1bc8dac47 (diff) | |
download | FreeBSD-src-24d53563ed2aafc4622e310d16018cbbd0c95388.zip FreeBSD-src-24d53563ed2aafc4622e310d16018cbbd0c95388.tar.gz |
Remove MUTEX_DECLARE() and MTX_COLD. Instead, postpone full mutex
initialization until after malloc() is safe to call, then iterate through
all mutexes and complete their initialization.
This change is necessary in order to avoid some circular bootstrapping
dependencies.
Diffstat (limited to 'sys/kern/kern_lock.c')
-rw-r--r-- | sys/kern/kern_lock.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/kern_lock.c b/sys/kern/kern_lock.c index 158377d..8314a0e 100644 --- a/sys/kern/kern_lock.c +++ b/sys/kern/kern_lock.c @@ -80,7 +80,7 @@ extern int lock_nmtx; int lock_mtx_selector; struct mtx *lock_mtx_array; -MUTEX_DECLARE(static, lock_mtx); +static struct mtx lock_mtx; static int acquire(struct lock *lkp, int extflags, int wanted); static int apause(struct lock *lkp, int flags); @@ -98,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_COLD); + mtx_init(&lock_mtx, "lockmgr", MTX_DEF); else { /* * This is necessary if (lock_nmtx == 1) and doesn't hurt @@ -546,7 +546,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_COLD); + mtx_init(&lock_mtx, "lockmgr", MTX_DEF); lock_mtx_selector = 1; } lkp->lk_interlock = &lock_mtx; |