Add signalfd call to bionic
Add signalfd() call to bionic.
Adding the signalfd call was done in 3 steps:
- add signalfd4 system call (function name and syscall
number) to libc/SYSCALLS.TXT
- generate all necessary headers by calling
libc/tools/gensyscalls.py. This patch is adding
the generated files since the build system
does not call gensyscalls.py.
- create the signalfd wrapper in signalfd.cpp and add
the function prototype to sys/signalfd.h
(cherry-pick of 0c11611c11f4dc1b6d43587b72c3ccbe8c51a51c, modified to
work with older versions of GCC still in use on some branches.)
Change-Id: I4c6c3f12199559af8be63f93a5336851b7e63355
diff --git a/libc/include/sys/linux-syscalls.h b/libc/include/sys/linux-syscalls.h
index ec48ada..738d9e8 100644
--- a/libc/include/sys/linux-syscalls.h
+++ b/libc/include/sys/linux-syscalls.h
@@ -173,6 +173,7 @@
#define __NR_rt_sigaction (__NR_SYSCALL_BASE + 174)
#define __NR_rt_sigprocmask (__NR_SYSCALL_BASE + 175)
#define __NR_rt_sigtimedwait (__NR_SYSCALL_BASE + 177)
+#define __NR_signalfd4 (__NR_SYSCALL_BASE + 355)
#define __NR_socket (__NR_SYSCALL_BASE + 281)
#define __NR_socketpair (__NR_SYSCALL_BASE + 288)
#define __NR_bind (__NR_SYSCALL_BASE + 282)
@@ -329,6 +330,7 @@
#define __NR_unshare (__NR_SYSCALL_BASE + 310)
#define __NR_getcpu (__NR_SYSCALL_BASE + 318)
#define __NR_utimensat (__NR_SYSCALL_BASE + 320)
+#define __NR_signalfd4 (__NR_SYSCALL_BASE + 327)
#define __NR_eventfd2 (__NR_SYSCALL_BASE + 328)
#define __NR_pipe2 (__NR_SYSCALL_BASE + 331)
#define __NR_perf_event_open (__NR_SYSCALL_BASE + 336)
@@ -463,6 +465,7 @@
#define __NR_ioprio_set (__NR_SYSCALL_BASE + 314)
#define __NR_ioprio_get (__NR_SYSCALL_BASE + 315)
#define __NR_utimensat (__NR_SYSCALL_BASE + 316)
+#define __NR_signalfd4 (__NR_SYSCALL_BASE + 324)
#define __NR_eventfd2 (__NR_SYSCALL_BASE + 325)
#define __NR_pipe2 (__NR_SYSCALL_BASE + 328)
#define __NR_perf_event_open (__NR_SYSCALL_BASE + 333)