[CRIU] [PATCH 1/2] add the waitid syscall

Tycho Andersen tycho.andersen at canonical.com
Mon Jul 20 22:56:42 PDT 2015


We'll use this in the next patch for collecting the zombies without
actually waiting on them.

Signed-off-by: Tycho Andersen <tycho.andersen at canonical.com>
---
 arch/arm/syscall.def             | 1 +
 arch/ppc64/syscall-ppc64.def     | 1 +
 arch/x86/syscalls/syscall_32.tbl | 1 +
 arch/x86/syscalls/syscall_64.tbl | 1 +
 include/syscall-types.h          | 2 ++
 5 files changed, 6 insertions(+)

diff --git a/arch/arm/syscall.def b/arch/arm/syscall.def
index 64321b6..55f444f 100644
--- a/arch/arm/syscall.def
+++ b/arch/arm/syscall.def
@@ -44,6 +44,7 @@ getsockopt			209	295	(int sockfd, int level, int optname, const void *optval, so
 clone				220	120	(unsigned long flags, void *child_stack, void *parent_tid, void *child_tid)
 exit				93	1	(unsigned long error_code)
 wait4				260	114	(int pid, int *status, int options, struct rusage *ru)
+waitid				280	!	(int which, pid_t pid, struct siginfo *infop, int options, struct rusage *ru)
 kill				129	37	(long pid, int sig)
 fcntl				25	55	(int fd, int type, long arg)
 flock				32	143	(int fd, unsigned long cmd)
diff --git a/arch/ppc64/syscall-ppc64.def b/arch/ppc64/syscall-ppc64.def
index 3debf7b..6064837 100644
--- a/arch/ppc64/syscall-ppc64.def
+++ b/arch/ppc64/syscall-ppc64.def
@@ -82,6 +82,7 @@ __NR_sys_timer_getoverrun	243		sys_timer_getoverrun	(int timer_id)
 __NR_sys_timer_delete	244		sys_timer_delete	(timer_t timer_id)
 __NR_clock_gettime	246		sys_clock_gettime	(const clockid_t which_clock, const struct timespec *tp)
 __NR_exit_group		234		sys_exit_group		(int error_code)
+__NR_waitid		272		sys_waitid		(int which, pid_t pid, struct siginfo *infop, int options, struct rusage *ru)
 __NR_set_robust_list	300		sys_set_robust_list	(struct robust_list_head *head, size_t len)
 __NR_get_robust_list	299		sys_get_robust_list	(int pid, struct robust_list_head **head_ptr, size_t *len_ptr)
 __NR_vmsplice		285		sys_vmsplice		(int fd, const struct iovec *iov, unsigned long nr_segs, unsigned int flags)
diff --git a/arch/x86/syscalls/syscall_32.tbl b/arch/x86/syscalls/syscall_32.tbl
index 0e06607..904102f 100644
--- a/arch/x86/syscalls/syscall_32.tbl
+++ b/arch/x86/syscalls/syscall_32.tbl
@@ -73,6 +73,7 @@ __NR_timer_gettime	261		sys_timer_gettime	(int timer_id, struct itimerspec *sett
 __NR_timer_getoverrun	262		sys_timer_getoverrun	(int timer_id)
 __NR_timer_delete	263		sys_timer_delete	(timer_t timer_id)
 __NR_clock_gettime	265		sys_clock_gettime	(int which_clock, struct timespec *tp)
+__NR_waitid		284		sys_waitid		(int which, pid_t pid, struct siginfo *infop, int options, struct rusage *ru)
 __NR_set_robust_list	311		sys_set_robust_list	(struct robust_list_head *head, size_t len)
 __NR_get_robust_list	312		sys_get_robust_list	(int pid, struct robust_list_head **head_ptr, size_t *len_ptr)
 __NR_vmsplice		316		sys_vmsplice		(int fd, const struct iovec *iov, unsigned int nr_segs, unsigned int flags)
diff --git a/arch/x86/syscalls/syscall_64.tbl b/arch/x86/syscalls/syscall_64.tbl
index 6090127..59e5a6a 100644
--- a/arch/x86/syscalls/syscall_64.tbl
+++ b/arch/x86/syscalls/syscall_64.tbl
@@ -84,6 +84,7 @@ __NR_sys_timer_delete		226		sys_timer_delete	(timer_t timer_id)
 __NR_clock_gettime		228		sys_clock_gettime	(const clockid_t which_clock, const struct timespec *tp)
 __NR_exit_group			231		sys_exit_group		(int error_code)
 __NR_openat			257		sys_openat		(int dfd, const char *filename, int flags, int mode)
+__NR_waitid			247		sys_waitid		(int which, pid_t pid, struct siginfo *infop, int options, struct rusage *ru)
 __NR_set_robust_list		273		sys_set_robust_list	(struct robust_list_head *head, size_t len)
 __NR_get_robust_list		274		sys_get_robust_list	(int pid, struct robust_list_head **head_ptr, size_t *len_ptr)
 __NR_vmsplice			278		sys_vmsplice		(int fd, const struct iovec *iov, unsigned long nr_segs, unsigned int flags)
diff --git a/include/syscall-types.h b/include/syscall-types.h
index c1a784d..d553a4b 100644
--- a/include/syscall-types.h
+++ b/include/syscall-types.h
@@ -80,4 +80,6 @@ struct krlimit {
 	unsigned long rlim_max;
 };
 
+struct siginfo;
+
 #endif /* __CR_SYSCALL_TYPES_H__ */
-- 
2.1.4



More information about the CRIU mailing list