diff options
author | Mike Frysinger <vapier@gentoo.org> | 2013-12-24 12:24:04 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2013-12-25 04:40:22 -0500 |
commit | aa8e3704259df300dd56795f8ddcdfa61ede5696 (patch) | |
tree | b29c8396376c0cac5a35a95ec7f1bd7892b01d9e /ports/sysdeps/unix/sysv/linux/ia64 | |
parent | 5243e58568c693c892845aca6e25f7b6adc7f094 (diff) | |
download | glibc-aa8e3704259df300dd56795f8ddcdfa61ede5696.tar.gz glibc-aa8e3704259df300dd56795f8ddcdfa61ede5696.tar.xz glibc-aa8e3704259df300dd56795f8ddcdfa61ede5696.zip |
ia64: implement futex requeue pi support
Used the s390 code as a guideline until all tests pass. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'ports/sysdeps/unix/sysv/linux/ia64')
-rw-r--r-- | ports/sysdeps/unix/sysv/linux/ia64/nptl/lowlevellock.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/ports/sysdeps/unix/sysv/linux/ia64/nptl/lowlevellock.h b/ports/sysdeps/unix/sysv/linux/ia64/nptl/lowlevellock.h index 90d8d816e0..5518b8adeb 100644 --- a/ports/sysdeps/unix/sysv/linux/ia64/nptl/lowlevellock.h +++ b/ports/sysdeps/unix/sysv/linux/ia64/nptl/lowlevellock.h @@ -38,6 +38,8 @@ #define FUTEX_TRYLOCK_PI 8 #define FUTEX_WAIT_BITSET 9 #define FUTEX_WAKE_BITSET 10 +#define FUTEX_WAIT_REQUEUE_PI 11 +#define FUTEX_CMP_REQUEUE_PI 12 #define FUTEX_PRIVATE_FLAG 128 #define FUTEX_CLOCK_REALTIME 256 @@ -138,6 +140,29 @@ while (0) _r10 == -1; \ }) +/* Priority Inheritance support. */ +#define lll_futex_wait_requeue_pi(futexp, val, mutex, private) \ + lll_futex_timed_wait_requeue_pi (futexp, val, NULL, 0, mutex, private) + +#define lll_futex_timed_wait_requeue_pi(futexp, val, timespec, clockbit, \ + mutex, private) \ +({ \ + int __op = FUTEX_WAIT_REQUEUE_PI | (clockbit); \ + \ + DO_INLINE_SYSCALL(futex, 5, (long) (futexp), \ + __lll_private_flag (__op, private), \ + (val), (timespec), mutex); \ + _r10 == -1; \ +}) + +#define lll_futex_cmp_requeue_pi(futexp, nr_wake, nr_move, mutex, val, priv) \ +({ \ + DO_INLINE_SYSCALL(futex, 6, (long) (futexp), \ + __lll_private_flag (FUTEX_CMP_REQUEUE_PI, priv), \ + (nr_wake), (nr_move), (mutex), (val)); \ + _r10 == -1 ? -_retval : _retval; \ +}) + #define __lll_trylock(futex) \ (atomic_compare_and_exchange_val_acq (futex, 1, 0) != 0) |