- MACRO_BEGIN \
- vm_object_assert_wait((object),(event),(interruptible)); \
- vm_object_unlock(object); \
- thread_block((void (*)(void)) 0); \
- MACRO_END
+ (vm_object_assert_wait((object),(event),(interruptible)), \
+ vm_object_unlock(object), \
+ thread_block(THREAD_CONTINUE_NULL)) \
+
+#define thread_sleep_vm_object(object, event, interruptible) \
+ thread_sleep_mutex((event_t)(event), &(object)->Lock, (interruptible))
+
+#define vm_object_sleep(object, event, interruptible) \
+ (((object)->all_wanted |= 1 << (event)), \
+ thread_sleep_vm_object((object), \
+ ((vm_offset_t)(object)+(event)), (interruptible)))