mirror of
git://sourceware.org/git/glibc.git
synced 2024-12-03 04:01:43 +08:00
m68k: add support for PI futexes
This commit is contained in:
parent
2ea2960024
commit
e1c5c75ea2
@ -1,5 +1,10 @@
|
||||
2013-12-10 Andreas Schwab <schwab@linux-m68k.org>
|
||||
|
||||
* sysdeps/unix/sysv/linux/m68k/nptl/lowlevellock.h
|
||||
(FUTEX_WAIT_REQEUE_PI, FUTEX_CMP_REQEUE_PI)
|
||||
(lll_futex_wait_requeue_pi, lll_futex_timed_wait_requeue_pi)
|
||||
(lll_futex_cmp_requeue_pi): Define.
|
||||
|
||||
* sysdeps/unix/sysv/linux/m68k/kernel-features.h
|
||||
(__ASSUME_REQUEUE_PI, __ASSUME_SET_ROBUST_LIST): Undefine before
|
||||
3.10.
|
||||
|
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user