diff options
author | jasone <jasone@FreeBSD.org> | 2001-01-24 12:35:55 +0000 |
---|---|---|
committer | jasone <jasone@FreeBSD.org> | 2001-01-24 12:35:55 +0000 |
commit | 8d2ec1ebc4a9454e2936c6fcbe29a5f1fd83504f (patch) | |
tree | 23bd3f0014237e1b861fed6a7c3b587948d149d5 /sys/vm | |
parent | c5cc2f8e2621f1d090434a5474a18fae384e1db6 (diff) | |
download | FreeBSD-src-8d2ec1ebc4a9454e2936c6fcbe29a5f1fd83504f.zip FreeBSD-src-8d2ec1ebc4a9454e2936c6fcbe29a5f1fd83504f.tar.gz |
Convert all simplelocks to mutexes and remove the simplelock implementations.
Diffstat (limited to 'sys/vm')
-rw-r--r-- | sys/vm/vm_object.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index 3eb5243..83ab496 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -75,6 +75,7 @@ #include <sys/vmmeter.h> #include <sys/mman.h> #include <sys/mount.h> +#include <sys/mutex.h> #include <vm/vm.h> #include <vm/vm_param.h> @@ -118,9 +119,7 @@ static void vm_object_qcollapse __P((vm_object_t object)); */ struct object_q vm_object_list; -#ifndef NULL_SIMPLELOCKS -static struct simplelock vm_object_list_lock; -#endif +static struct mtx vm_object_list_mtx; static long vm_object_count; /* count of all objects */ vm_object_t kernel_object; vm_object_t kmem_object; @@ -189,7 +188,7 @@ void vm_object_init() { TAILQ_INIT(&vm_object_list); - simple_lock_init(&vm_object_list_lock); + mtx_init(&vm_object_list_mtx, "vm object_list", MTX_DEF); vm_object_count = 0; kernel_object = &kernel_object_store; @@ -459,9 +458,9 @@ vm_object_terminate(object) /* * Remove the object from the global object list. */ - simple_lock(&vm_object_list_lock); + mtx_enter(&vm_object_list_mtx, MTX_DEF); TAILQ_REMOVE(&vm_object_list, object, object_list); - simple_unlock(&vm_object_list_lock); + mtx_exit(&vm_object_list_mtx, MTX_DEF); wakeup(object); |