This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH/committed] 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>
---
 ports/ChangeLog.ia64                               |  9 ++++++++
 .../unix/sysv/linux/ia64/nptl/lowlevellock.h       | 25 ++++++++++++++++++++++
 2 files changed, 34 insertions(+)

diff --git a/ports/ChangeLog.ia64 b/ports/ChangeLog.ia64
index c1f2035..34391c1 100644
--- a/ports/ChangeLog.ia64
+++ b/ports/ChangeLog.ia64
@@ -1,6 +1,15 @@
 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
 	(lll_futex_timed_wait_bitset): Define.
 
 2013-12-24  Mike Frysinger  <vapier@gentoo.org>
diff --git a/ports/sysdeps/unix/sysv/linux/ia64/nptl/lowlevellock.h b/ports/sysdeps/unix/sysv/linux/ia64/nptl/lowlevellock.h
index 90d8d81..5518b8a 100644
--- a/ports/sysdeps/unix/sysv/linux/ia64/nptl/lowlevellock.h
+++ b/ports/sysdeps/unix/sysv/linux/ia64/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
 
@@ -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)
-- 
1.8.4.3


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]