public inbox for libc-ports@sourceware.org
 help / color / mirror / Atom feed
* [COMMITED 2/2] Add FUTEX_*_REQUEUE_PI support for Alpha.
  2013-02-21  1:01 [COMMITED 1/2] alpha: Include errno.h in sysdep.h Richard Henderson
@ 2013-02-21  1:01 ` Richard Henderson
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Henderson @ 2013-02-21  1:01 UTC (permalink / raw)
  To: libc-ports

---
 ports/ChangeLog.alpha                              | 10 +++++++++
 .../unix/sysv/linux/alpha/nptl/lowlevellock.h      | 25 ++++++++++++++++++++++
 2 files changed, 35 insertions(+)

diff --git a/ports/ChangeLog.alpha b/ports/ChangeLog.alpha
index 9cd2076..2814559 100644
--- a/ports/ChangeLog.alpha
+++ b/ports/ChangeLog.alpha
@@ -1,3 +1,13 @@
+2013-02-19  Richard Henderson  <rth@redhat.com>
+
+	[BZ #14920]
+	* sysdeps/unix/sysv/linux/alpha/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-02-20  Richard Henderson  <rth@redhat.com>
 
 	* sysdeps/unix/alpha/sysdep.h: Include <errno.h>.
diff --git a/ports/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h b/ports/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h
index e50324c..cf6b8bf 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)
-- 
1.8.1.2

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [COMMITED 1/2] alpha: Include errno.h in sysdep.h
@ 2013-02-21  1:01 Richard Henderson
  2013-02-21  1:01 ` [COMMITED 2/2] Add FUTEX_*_REQUEUE_PI support for Alpha Richard Henderson
  0 siblings, 1 reply; 2+ messages in thread
From: Richard Henderson @ 2013-02-21  1:01 UTC (permalink / raw)
  To: libc-ports

Recent changes in malloc-sysdep.h exposed this error, the
symptom being __set_errno was not defined early enough.
---
 ports/ChangeLog.alpha             | 4 ++++
 ports/sysdeps/unix/alpha/sysdep.h | 3 +++
 2 files changed, 7 insertions(+)

diff --git a/ports/ChangeLog.alpha b/ports/ChangeLog.alpha
index 0ac8add..9cd2076 100644
--- a/ports/ChangeLog.alpha
+++ b/ports/ChangeLog.alpha
@@ -1,3 +1,7 @@
+2013-02-20  Richard Henderson  <rth@redhat.com>
+
+	* sysdeps/unix/alpha/sysdep.h: Include <errno.h>.
+
 2013-02-18  Siddhesh Poyarekar  <siddhesh@redhat.com>
 
 	* sysdeps/unix/sysv/linux/alpha/nptl/libc.abilist: Add
diff --git a/ports/sysdeps/unix/alpha/sysdep.h b/ports/sysdeps/unix/alpha/sysdep.h
index 3b71a5e..d20bcd6 100644
--- a/ports/sysdeps/unix/alpha/sysdep.h
+++ b/ports/sysdeps/unix/alpha/sysdep.h
@@ -161,6 +161,9 @@ __LABEL(name)						\
 
 #else /* !ASSEMBLER */
 
+/* In order to get __set_errno() definition in INLINE_SYSCALL.  */
+#include <errno.h>
+
 /* ??? Linux needs to be able to override INLINE_SYSCALL for one
    particular special case.  Make this easy.  */
 
-- 
1.8.1.2

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-02-21  1:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-21  1:01 [COMMITED 1/2] alpha: Include errno.h in sysdep.h Richard Henderson
2013-02-21  1:01 ` [COMMITED 2/2] Add FUTEX_*_REQUEUE_PI support for Alpha Richard Henderson

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).