summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_malloc.c
diff options
context:
space:
mode:
authorjasone <jasone@FreeBSD.org>2001-01-21 07:52:20 +0000
committerjasone <jasone@FreeBSD.org>2001-01-21 07:52:20 +0000
commit24d53563ed2aafc4622e310d16018cbbd0c95388 (patch)
tree0ed4cd8e7aa2e3a663ed7f62261fe70082bc423c /sys/kern/kern_malloc.c
parentdb586afb8bf54fe67c82b3bd5e80f1c1bc8dac47 (diff)
downloadFreeBSD-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_malloc.c')
-rw-r--r--sys/kern/kern_malloc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_malloc.c b/sys/kern/kern_malloc.c
index d6275b8..396f02b 100644
--- a/sys/kern/kern_malloc.c
+++ b/sys/kern/kern_malloc.c
@@ -74,7 +74,7 @@ static struct kmemusage *kmemusage;
static char *kmembase;
static char *kmemlimit;
-MUTEX_DECLARE(static, malloc_mtx);
+static struct mtx malloc_mtx;
u_int vm_kmem_size;
@@ -439,7 +439,7 @@ kmeminit(dummy)
#error "kmeminit: MAXALLOCSAVE too small"
#endif
- mtx_init(&malloc_mtx, "malloc", MTX_DEF | MTX_COLD);
+ mtx_init(&malloc_mtx, "malloc", MTX_DEF);
/*
* Try to auto-tune the kernel memory size, so that it is
OpenPOWER on IntegriCloud