From: Mike Frysinger Date: Tue, 24 Dec 2013 12:24:04 +0000 (+0000) Subject: ia64: implement futex requeue pi support X-Git-Tag: upstream/2.20~1123 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=aa8e3704259df300dd56795f8ddcdfa61ede5696;p=platform%2Fupstream%2Flinaro-glibc.git ia64: implement futex requeue pi support Used the s390 code as a guideline until all tests pass. Signed-off-by: Mike Frysinger --- diff --git a/ports/ChangeLog.ia64 b/ports/ChangeLog.ia64 index c1f2035..34391c1 100644 --- a/ports/ChangeLog.ia64 +++ b/ports/ChangeLog.ia64 @@ -1,6 +1,15 @@ 2013-12-25 Mike Frysinger * sysdeps/unix/sysv/linux/ia64/nptl/lowlevellock.h + (FUTEX_WAIT_REQUEUE_PI): Define. + (FUTEX_CMP_REQUEUE_PI): Likewise. + (lll_futex_wait_requeue_pi): Likewise. + (lll_futex_timed_wait_requeue_pi): Likewise. + (lll_futex_cmp_requeue_pi): Likewise. + +2013-12-25 Mike Frysinger + + * sysdeps/unix/sysv/linux/ia64/nptl/lowlevellock.h (lll_futex_timed_wait_bitset): Define. 2013-12-24 Mike Frysinger diff --git a/ports/sysdeps/unix/sysv/linux/ia64/nptl/lowlevellock.h b/ports/sysdeps/unix/sysv/linux/ia64/nptl/lowlevellock.h index 90d8d81..5518b8a 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)