From e6968f4b0830d0f965a3349a4570a2304b2ff7aa Mon Sep 17 00:00:00 2001 From: Andrey Vagin Date: Thu, 19 Jan 2012 01:33:17 +0300 Subject: [PATCH] syscall: add waitpid() Signed-off-by: Andrey Vagin Acked-by: Pavel Emelyanov Signed-off-by: Cyrill Gorcunov --- include/syscall-codes.h | 1 + include/syscall.h | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/include/syscall-codes.h b/include/syscall-codes.h index f61c7155d..1b6b66cc3 100644 --- a/include/syscall-codes.h +++ b/include/syscall-codes.h @@ -22,6 +22,7 @@ #define __NR_getpid 39 #define __NR_clone 56 #define __NR_exit 60 +#define __NR_wait4 61 #define __NR_flock 73 #define __NR_unlink 87 #define __NR_tgkill 131 diff --git a/include/syscall.h b/include/syscall.h index d37b03a9a..0396e7485 100644 --- a/include/syscall.h +++ b/include/syscall.h @@ -194,6 +194,11 @@ static always_inline long sys_read(unsigned long fd, void *buf, unsigned long co return syscall3(__NR_read, fd, (unsigned long)buf, count); } +static always_inline long sys_waitpid(int pid, int *status, int options) +{ + return syscall4(__NR_wait4, pid, (unsigned long)status, options, 0); +} + static always_inline long sys_exit(unsigned long error_code) { return syscall1(__NR_exit, error_code);