diff options
author | Richard Henderson <rth@twiddle.net> | 2013-02-20 16:57:55 -0800 |
---|---|---|
committer | Richard Henderson <rth@twiddle.net> | 2013-02-20 16:57:55 -0800 |
commit | 97ccb9d55a5379eeea6988f26e7f3ad500af0991 (patch) | |
tree | 289d3c12f136dd1383a4e8d24ded87bac0530c37 /ports/sysdeps/unix/sysv | |
parent | ccdef322b865e804d08b368cf75601897e2c57f1 (diff) | |
download | glibc-97ccb9d55a5379eeea6988f26e7f3ad500af0991.tar.gz glibc-97ccb9d55a5379eeea6988f26e7f3ad500af0991.tar.xz glibc-97ccb9d55a5379eeea6988f26e7f3ad500af0991.zip |
Add FUTEX_*_REQUEUE_PI support for Alpha.
Diffstat (limited to 'ports/sysdeps/unix/sysv')
-rw-r--r-- | ports/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/ports/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h b/ports/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h index e50324cdd7..cf6b8bfd9b 100644 --- a/ports/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h +++ b/ports/sysdeps/unix/sysv/linux/alpha/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 @@ -143,8 +145,31 @@ INTERNAL_SYSCALL_ERROR_P (__ret, __err); \ }) +/* 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) \ + ({ \ + INTERNAL_SYSCALL_DECL (__err); \ + int __op = FUTEX_WAIT_REQUEUE_PI | clockbit; \ + \ + INTERNAL_SYSCALL (futex, __err, 5, (futexp), \ + __lll_private_flag (__op, private), \ + (val), (timespec), mutex); \ + }) +#define lll_futex_cmp_requeue_pi(futexp, nr_wake, nr_move, mutex, val, priv) \ + ({ \ + INTERNAL_SYSCALL_DECL (__err); \ + long int __ret; \ + \ + __ret = INTERNAL_SYSCALL (futex, __err, 6, (futexp), \ + __lll_private_flag (FUTEX_CMP_REQUEUE_PI, priv),\ + (nr_wake), (nr_move), (mutex), (val)); \ + INTERNAL_SYSCALL_ERROR_P (__ret, __err); \ + }) static inline int __attribute__((always_inline)) __lll_trylock(int *futex) |