diff options
author | alc <alc@FreeBSD.org> | 2003-04-13 18:39:47 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2003-04-13 18:39:47 +0000 |
commit | 0dbe173de243cb88609f79d64a30e8311f966221 (patch) | |
tree | b519a4abb4b0fb191e5bc4094f88700a2997529b /sys/vm | |
parent | 0a9a218038b85fdbb391c7fa8f43b97e6f78e32f (diff) | |
download | FreeBSD-src-0dbe173de243cb88609f79d64a30e8311f966221.zip FreeBSD-src-0dbe173de243cb88609f79d64a30e8311f966221.tar.gz |
Add new macros for locking and unlocking a vm object.
Diffstat (limited to 'sys/vm')
-rw-r--r-- | sys/vm/vm_object.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/vm/vm_object.h b/sys/vm/vm_object.h index 467d7f0..4f4f77b 100644 --- a/sys/vm/vm_object.h +++ b/sys/vm/vm_object.h @@ -170,6 +170,9 @@ extern struct mtx vm_object_list_mtx; /* lock for object list and count */ extern vm_object_t kernel_object; /* the single kernel object */ extern vm_object_t kmem_object; +#define VM_OBJECT_LOCK(object) mtx_lock(&(object)->mtx) +#define VM_OBJECT_UNLOCK(object) mtx_unlock(&(object)->mtx) + #define vm_object_lock(object) \ mtx_lock((object) == kmem_object ? &kmem_object->mtx : &Giant) #define vm_object_unlock(object) \ |