summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_object.h
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2003-04-19 21:15:44 +0000
committeralc <alc@FreeBSD.org>2003-04-19 21:15:44 +0000
commitef4e8a19cfc9fb054dbda2b5efdaef60ef82438c (patch)
tree1252eafc53a186512ad8520018edf2e4e5639731 /sys/vm/vm_object.h
parentd558a7a53b5bf20f012c13da1c784b62854e09b1 (diff)
downloadFreeBSD-src-ef4e8a19cfc9fb054dbda2b5efdaef60ef82438c.zip
FreeBSD-src-ef4e8a19cfc9fb054dbda2b5efdaef60ef82438c.tar.gz
- Lock the vm_object when performing vm_object_pip_wakeupn().
- Assert that the vm_object lock is held in vm_object_pip_wakeupn(). - Add a new macro VM_OBJECT_LOCK_ASSERT().
Diffstat (limited to 'sys/vm/vm_object.h')
-rw-r--r--sys/vm/vm_object.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/vm/vm_object.h b/sys/vm/vm_object.h
index 4f4f77b..9dd0ab9 100644
--- a/sys/vm/vm_object.h
+++ b/sys/vm/vm_object.h
@@ -171,6 +171,8 @@ 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_LOCK_ASSERT(object, type) \
+ mtx_assert(&(object)->mtx, (type))
#define VM_OBJECT_UNLOCK(object) mtx_unlock(&(object)->mtx)
#define vm_object_lock(object) \
OpenPOWER on IntegriCloud