From 6231c1d6d8c41ee9798a59abafdd7dfd973dd0e5 Mon Sep 17 00:00:00 2001 From: jhb Date: Fri, 20 Oct 2000 07:29:16 +0000 Subject: - machine/mutex.h -> sys/mutex.h - Use MUTEX_DECLARE() and MTX_COLD for the malloc_mtx mutex --- sys/kern/kern_malloc.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'sys/kern/kern_malloc.c') diff --git a/sys/kern/kern_malloc.c b/sys/kern/kern_malloc.c index 9219428..a2e77fd 100644 --- a/sys/kern/kern_malloc.c +++ b/sys/kern/kern_malloc.c @@ -41,11 +41,10 @@ #include #include #include +#include #include #include -#include - #include #include #include @@ -75,7 +74,7 @@ static struct kmemusage *kmemusage; static char *kmembase; static char *kmemlimit; -struct mtx malloc_mtx; +MUTEX_DECLARE(static, malloc_mtx); u_int vm_kmem_size; @@ -437,7 +436,7 @@ kmeminit(dummy) #error "kmeminit: MAXALLOCSAVE too small" #endif - mtx_init(&malloc_mtx, "malloc", MTX_DEF); + mtx_init(&malloc_mtx, "malloc", MTX_DEF | MTX_COLD); /* * Try to auto-tune the kernel memory size, so that it is -- cgit v1.1