aboutsummaryrefslogtreecommitdiff
path: root/mach
diff options
context:
space:
mode:
Diffstat (limited to 'mach')
-rw-r--r--mach/lowlevellock.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/mach/lowlevellock.h b/mach/lowlevellock.h
index 0a22a030b4..b872d0fe1e 100644
--- a/mach/lowlevellock.h
+++ b/mach/lowlevellock.h
@@ -34,6 +34,17 @@
/* Static initializer for low-level locks. */
#define LLL_LOCK_INITIALIZER 0
+/* Interruptible version of __gsync_wait. */
+extern kern_return_t __gsync_wait_intr
+(
+ mach_port_t task,
+ vm_offset_t addr,
+ unsigned val1,
+ unsigned val2,
+ natural_t msec,
+ int flags
+);
+
/* Wait on address PTR, without blocking if its contents
* are different from VAL. */
#define __lll_wait(ptr, val, flags) \
@@ -42,6 +53,13 @@
#define lll_wait(var, val, flags) \
__lll_wait (&(var), val, flags)
+/* Interruptible version. */
+#define __lll_wait_intr(ptr, val, flags) \
+ __gsync_wait_intr (__mach_task_self (), \
+ (vm_offset_t)(ptr), (val), 0, 0, (flags))
+#define lll_wait_intr(var, val, flags) \
+ __lll_wait_intr ((&var), val, flags)
+
/* Wake one or more threads waiting on address PTR. */
#define __lll_wake(ptr, flags) \
__gsync_wake (__mach_task_self (), (vm_offset_t)(ptr), 0, (flags))