diff mbox series

[v2,5/8] Cleanup Linux sigqueue implementation

Message ID 1509975426-1772-5-git-send-email-adhemerval.zanella@linaro.org
State New
Headers show
Series [v2,1/8] Rename nptl-signals.h to internal-signals.h | expand

Commit Message

Adhemerval Zanella Nov. 6, 2017, 1:37 p.m. UTC
Changes from previous version:

  - Add a note about __NR_rt_sigqueueinfo Linux minimum version support.

---

This patch simplify Linux sigqueue implementation by assuming
__NR_rt_sigqueueinfo existence due minimum kernel requirement
(tt pre-dates Linux git inclusion for Linux 2.6.12).

Checked on x86_64-linux-gnu.

	* sysdeps/unix/sysv/linux/sigqueue.c (__sigqueue): Asssume
	__NR_rt_sigqueueinfo.

Signed-off-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>

Reviewed-by: Zack Weinberg <zackw@panix.com>

---
 ChangeLog                          |  3 +++
 sysdeps/unix/sysv/linux/sigqueue.c | 10 ++--------
 2 files changed, 5 insertions(+), 8 deletions(-)

-- 
2.7.4
diff mbox series

Patch

diff --git a/sysdeps/unix/sysv/linux/sigqueue.c b/sysdeps/unix/sysv/linux/sigqueue.c
index 059e524..67bb6b2 100644
--- a/sysdeps/unix/sysv/linux/sigqueue.c
+++ b/sysdeps/unix/sysv/linux/sigqueue.c
@@ -17,13 +17,10 @@ 
 
 #include <errno.h>
 #include <signal.h>
-#include <unistd.h>
 #include <string.h>
-
+#include <unistd.h>
 #include <sysdep.h>
-#include <sys/syscall.h>
 
-#ifdef __NR_rt_sigqueueinfo
 /* Return any pending signal or wait for one for the given time.  */
 int
 __sigqueue (pid_t pid, int sig, const union sigval val)
@@ -40,9 +37,6 @@  __sigqueue (pid_t pid, int sig, const union sigval val)
   info.si_uid = __getuid ();
   info.si_value = val;
 
-  return INLINE_SYSCALL (rt_sigqueueinfo, 3, pid, sig, &info);
+  return INLINE_SYSCALL_CALL (rt_sigqueueinfo, pid, sig, &info);
 }
 weak_alias (__sigqueue, sigqueue)
-#else
-# include <signal/sigqueue.c>
-#endif