- machine/mutex.h -> sys/mutex.h
- Use MUTEX_DECLARE() and MTX_COLD for the malloc_mtx mutex
This commit is contained in:
parent
d8881ca31d
commit
eec258d257
@ -41,11 +41,10 @@
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/malloc.h>
|
||||
#include <sys/mbuf.h>
|
||||
#include <sys/mutex.h>
|
||||
#include <sys/vmmeter.h>
|
||||
#include <sys/lock.h>
|
||||
|
||||
#include <machine/mutex.h>
|
||||
|
||||
#include <vm/vm.h>
|
||||
#include <vm/vm_param.h>
|
||||
#include <vm/vm_kern.h>
|
||||
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user