Add getsid system call to bionic
Add getsid() system call to bionic for
all architectures. This is needed for various tools
(e.g. perf).
Adding the getsid system call was done in 3 steps:
() add getsid 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.
() add the system call signature to libc/include/unistd.h
Change-Id: Id69a257e13ec02e1a44085a6b217a3f19ab025b1
Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
diff --git a/libc/include/sys/linux-syscalls.h b/libc/include/sys/linux-syscalls.h
index 48564cd..0568293 100644
--- a/libc/include/sys/linux-syscalls.h
+++ b/libc/include/sys/linux-syscalls.h
@@ -83,6 +83,7 @@
#define __NR_msync (__NR_SYSCALL_BASE + 144)
#define __NR_readv (__NR_SYSCALL_BASE + 145)
#define __NR_writev (__NR_SYSCALL_BASE + 146)
+#define __NR_getsid (__NR_SYSCALL_BASE + 147)
#define __NR_perf_event_open (__NR_SYSCALL_BASE + 364)
#ifdef __arm__
diff --git a/libc/include/unistd.h b/libc/include/unistd.h
index d8263fe..a6a6dbf 100644
--- a/libc/include/unistd.h
+++ b/libc/include/unistd.h
@@ -60,6 +60,7 @@
extern pid_t getppid(void);
extern pid_t getpgrp(void);
extern int setpgrp(void);
+extern pid_t getsid(pid_t);
extern pid_t setsid(void);
extern int execv(const char *, char * const *);
@@ -192,7 +193,6 @@
extern int tcsetpgrp(int fd, pid_t _pid);
#if 0 /* MISSING FROM BIONIC */
-extern pid_t getsid(pid_t);
extern int execvpe(const char *, char * const *, char * const *);
extern int execlpe(const char *, const char *, ...);
extern int getfsuid(uid_t);