+#if TASK_SWAPPER
+
+__private_extern__ void vm_object_res_reference(
+ vm_object_t object);
+__private_extern__ void vm_object_res_deallocate(
+ vm_object_t object);
+#define VM_OBJ_RES_INCR(object) (object)->res_count++
+#define VM_OBJ_RES_DECR(object) (object)->res_count--
+
+#else /* TASK_SWAPPER */
+
+#define VM_OBJ_RES_INCR(object)
+#define VM_OBJ_RES_DECR(object)
+#define vm_object_res_reference(object)
+#define vm_object_res_deallocate(object)
+
+#endif /* TASK_SWAPPER */
+
+#define vm_object_reference_locked(object) \
+MACRO_BEGIN \
+ vm_object_t RLObject = (object); \
+ assert((RLObject)->ref_count > 0); \
+ (RLObject)->ref_count++; \
+ vm_object_res_reference(RLObject); \
+MACRO_END
+
+