aboutsummaryrefslogtreecommitdiff
path: root/vm/vm_object.h
diff options
context:
space:
mode:
Diffstat (limited to 'vm/vm_object.h')
-rw-r--r--vm/vm_object.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/vm/vm_object.h b/vm/vm_object.h
index f8f9bf8d..80d449a0 100644
--- a/vm/vm_object.h
+++ b/vm/vm_object.h
@@ -396,4 +396,18 @@ MACRO_END
extern int vm_object_external_count;
extern int vm_object_external_pages;
+/* Add a reference to a locked VM object. */
+static inline int
+vm_object_reference_locked (vm_object_t obj)
+{
+ return (++obj->ref_count);
+}
+
+/* Remove a reference from a locked VM object. */
+static inline int
+vm_object_unreference_locked (vm_object_t obj)
+{
+ return (--obj->ref_count);
+}
+
#endif /* _VM_VM_OBJECT_H_ */