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>
This commit is contained in:
Mike Frysinger 2013-12-24 12:24:04 +00:00
parent 5243e58568
commit aa8e370425
2 changed files with 34 additions and 0 deletions

View File

@ -1,3 +1,12 @@
2013-12-25 Mike Frysinger <vapier@gentoo.org>
* 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 <vapier@gentoo.org>
* sysdeps/unix/sysv/linux/ia64/nptl/lowlevellock.h

View File

@ -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)