diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2020-12-13 11:01:52 +0000 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2020-12-16 01:58:33 +0100 |
commit | 59bb023c8361c0e12e8eee1810897c5e3ea223b3 (patch) | |
tree | 1b0ac0698b6f01aa8c69d0960f9bc1f49ec62f03 /mach | |
parent | bec412424e949c900b01767ce32b6743bdaaac93 (diff) | |
download | glibc-59bb023c8361c0e12e8eee1810897c5e3ea223b3.tar glibc-59bb023c8361c0e12e8eee1810897c5e3ea223b3.tar.gz glibc-59bb023c8361c0e12e8eee1810897c5e3ea223b3.tar.bz2 glibc-59bb023c8361c0e12e8eee1810897c5e3ea223b3.zip |
hurd: Add __lll_abstimed_wait_intr
For semaphores, we need an interruptible version of low-level locks.
Diffstat (limited to 'mach')
-rw-r--r-- | mach/lowlevellock.h | 18 |
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)) |