Commit b51cae21ee66f77a368428e6bdf75a0c012c9fd7

Authored by Chris Metcalf
1 parent 9c78965ca1

Add wait4() back to the set of <asm-generic/unistd.h> syscalls.

The initial pass at the generic ABI assumed that wait4() could be
easily expressed using waitid().  Although it's true that wait4()
can be built on waitid(), it's awkward enough that it makes more
sense to continue to include wait4 in the generic syscall ABI.

Since there is already a deprecated wait4 in the ABI, this change
converts that wait4 into old_wait, and puts wait4 in the next
available slot for new supported syscalls, after the platform-specific
syscalls at number 260.

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>

Showing 2 changed files with 6 additions and 4 deletions Side-by-side Diff

include/asm-generic/unistd.h
... ... @@ -638,8 +638,11 @@
638 638 */
639 639 #define __NR_arch_specific_syscall 244
640 640  
  641 +#define __NR_wait4 260
  642 +__SYSCALL(__NR_wait4, sys_wait4)
  643 +
641 644 #undef __NR_syscalls
642   -#define __NR_syscalls 260
  645 +#define __NR_syscalls 261
643 646  
644 647 /*
645 648 * All syscalls below here should go away really,
... ... @@ -776,8 +779,8 @@
776 779 __SYSCALL(__NR_ustat, sys_ustat)
777 780 #define __NR_vfork 1071
778 781 __SYSCALL(__NR_vfork, sys_vfork)
779   -#define __NR_wait4 1072
780   -__SYSCALL(__NR_wait4, sys_wait4)
  782 +#define __NR_oldwait4 1072
  783 +__SYSCALL(__NR_oldwait4, sys_wait4)
781 784 #define __NR_recv 1073
782 785 __SYSCALL(__NR_recv, sys_recv)
783 786 #define __NR_send 1074
scripts/checksyscalls.sh
... ... @@ -183,7 +183,6 @@
183 183 #define __IGNORE_ustat /* statfs */
184 184 #define __IGNORE_utime /* utimes */
185 185 #define __IGNORE_vfork /* clone */
186   -#define __IGNORE_wait4 /* waitid */
187 186  
188 187 /* sync_file_range had a stupid ABI. Allow sync_file_range2 instead */
189 188 #ifdef __NR_sync_file_range2