diff options
author | attilio <attilio@FreeBSD.org> | 2013-02-20 12:06:33 +0000 |
---|---|---|
committer | attilio <attilio@FreeBSD.org> | 2013-02-20 12:06:33 +0000 |
commit | b2afca498773e09e8d3ae19e574ec5401a3f3fa8 (patch) | |
tree | b1bca4ebfedd47be5d25e83ada434da01b254044 /sys/vm/vm_object.h | |
parent | 15bf891afe5ecb096114725fc8e6dc1cc3ef70d6 (diff) | |
download | FreeBSD-src-b2afca498773e09e8d3ae19e574ec5401a3f3fa8.zip FreeBSD-src-b2afca498773e09e8d3ae19e574ec5401a3f3fa8.tar.gz |
Add read mode operations to VM_OBJECT_LOCK* class of functions.
Sponsored by: EMC / Isilon storage division
Diffstat (limited to 'sys/vm/vm_object.h')
-rw-r--r-- | sys/vm/vm_object.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/vm/vm_object.h b/sys/vm/vm_object.h index fe9d505..5440fd8 100644 --- a/sys/vm/vm_object.h +++ b/sys/vm/vm_object.h @@ -208,8 +208,14 @@ extern struct vm_object kmem_object_store; rw_assert(&(object)->lock, (type)) #define VM_OBJECT_LOCK_INIT(object, name) \ rw_init_flags(&(object)->lock, (name), RW_DUPOK) +#define VM_OBJECT_RLOCK(object) \ + rw_rlock(&(object)->lock) +#define VM_OBJECT_RUNLOCK(object) \ + rw_runlock(&(object)->lock) #define VM_OBJECT_SLEEP(wchan, object, pri, wmesg, timo) \ rw_sleep((wchan), &(object)->lock, (pri), (wmesg), (timo)) +#define VM_OBJECT_TRYRLOCK(object) \ + rw_try_rlock(&(object)->lock) #define VM_OBJECT_TRYWLOCK(object) \ rw_try_wlock(&(object)->lock) #define VM_OBJECT_WLOCK(object) \ |