* [PATCH, COMMITTED] [AArch64] Implement FUTEX_*_REQUEUE_PI
@ 2013-12-17 17:58 Marcus Shawcroft
0 siblings, 0 replies; only message in thread
From: Marcus Shawcroft @ 2013-12-17 17:58 UTC (permalink / raw)
To: libc-ports
[-- Attachment #1: Type: text/plain, Size: 163 bytes --]
This patch provides the AArch64 implementation of FUTEX_*_REQUEUE_PI.
Regression tested, committed. I'll update the port status page on the WIKI.
Cheers
/Marcus
[-- Attachment #2: glibc-aarch64-futex-requeue_pi.txt --]
[-- Type: text/plain, Size: 2433 bytes --]
diff --git a/ports/ChangeLog.aarch64 b/ports/ChangeLog.aarch64
index e65e87a..e787d24 100644
--- a/ports/ChangeLog.aarch64
+++ b/ports/ChangeLog.aarch64
@@ -1,3 +1,12 @@
+2013-12-17 Marcus Shawcroft <marcus.shawcroft@linaro.org>
+
+ * sysdeps/unix/sysv/linux/aarch64/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-17 Marcus Shawcroft <marcus.shawcroft@linaro.org>
* sysdeps/aarch64/Makefile (CFLAGS-e_sqrt.c): Add
diff --git a/ports/sysdeps/unix/sysv/linux/aarch64/nptl/lowlevellock.h b/ports/sysdeps/unix/sysv/linux/aarch64/nptl/lowlevellock.h
index 52f8a7a..851c85d 100644
--- a/ports/sysdeps/unix/sysv/linux/aarch64/nptl/lowlevellock.h
+++ b/ports/sysdeps/unix/sysv/linux/aarch64/nptl/lowlevellock.h
@@ -37,6 +37,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,6 +145,35 @@
})
+/* 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); \
+ INTERNAL_SYSCALL_ERROR_P (__ret, __err) ? -__ret : __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)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2013-12-17 17:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-17 17:58 [PATCH, COMMITTED] [AArch64] Implement FUTEX_*_REQUEUE_PI Marcus Shawcroft
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).