diff options
author | Andreas Schwab <schwab@linux-m68k.org> | 2013-12-04 01:41:08 +0100 |
---|---|---|
committer | Andreas Schwab <schwab@linux-m68k.org> | 2013-12-10 00:16:01 +0100 |
commit | e1c5c75ea265234164332ded6c272528e38df291 (patch) | |
tree | d21ced3cd93de43aed7b6bb29adb87f550561d36 /ports/sysdeps/unix/sysv/linux/m68k | |
parent | 2ea296002440d0ae34cdd87b696c2668ff26b249 (diff) | |
download | glibc-e1c5c75ea265234164332ded6c272528e38df291.zip glibc-e1c5c75ea265234164332ded6c272528e38df291.tar.gz glibc-e1c5c75ea265234164332ded6c272528e38df291.tar.bz2 |
m68k: add support for PI futexes
Diffstat (limited to 'ports/sysdeps/unix/sysv/linux/m68k')
-rw-r--r-- | ports/sysdeps/unix/sysv/linux/m68k/nptl/lowlevellock.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/ports/sysdeps/unix/sysv/linux/m68k/nptl/lowlevellock.h b/ports/sysdeps/unix/sysv/linux/m68k/nptl/lowlevellock.h index 0df6604..3a25477 100644 --- a/ports/sysdeps/unix/sysv/linux/m68k/nptl/lowlevellock.h +++ b/ports/sysdeps/unix/sysv/linux/m68k/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_REQEUE_PI 11 +#define FUTEX_CMP_REQEUE_PI 12 #define FUTEX_PRIVATE_FLAG 128 #define FUTEX_CLOCK_REALTIME 256 @@ -142,6 +144,33 @@ 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); \ + long int __ret; \ + int __op = FUTEX_WAIT_REQUEUE_PI | clockbit; \ + \ + __ret = INTERNAL_SYSCALL (futex, __err, 5, (futexp), \ + __lll_private_flag (__op, private), \ + (val), (timespec), mutex); \ + __ret; \ + }) + +#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); \ + }) + #define lll_trylock(lock) \ atomic_compare_and_exchange_val_acq (&(lock), 1, 0) |