diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2025-01-22 12:36:16 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2025-01-22 12:36:16 -0800 |
| commit | 7004a2e46d1693848370809aa3d9c340a209edbb (patch) | |
| tree | de4d12f784b6e7a43669b39e4a07c6b6bac49ee6 /tools/include | |
| parent | e8f17cb6f5abd4e52e89b5768c7016b7dab1e6fe (diff) | |
| parent | 24728b70b036ab63557c4524640010816b4ab155 (diff) | |
Merge tag 'linux_kselftest-nolibc-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
Pull nolibc updates from Shuah Khan:
- add support for waitid()
- use waitid() over waitpid()
- use a pipe in vfprintf tests
- skip tests for unimplemented syscalls
- rename riscv to riscv64
- add configurations for riscv32
- add detecting missing toolchain to run-tests.sh
* tag 'linux_kselftest-nolibc-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
selftests/nolibc: add configurations for riscv32
selftests/nolibc: rename riscv to riscv64
selftests/nolibc: skip tests for unimplemented syscalls
selftests/nolibc: use a pipe to in vfprintf tests
selftests/nolibc: use waitid() over waitpid()
tools/nolibc: add support for waitid()
selftests/nolibc: run-tests.sh: detect missing toolchain
Diffstat (limited to 'tools/include')
| -rw-r--r-- | tools/include/nolibc/sys.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tools/include/nolibc/sys.h b/tools/include/nolibc/sys.h index 7b82bc3cf107..d4a5c2399a66 100644 --- a/tools/include/nolibc/sys.h +++ b/tools/include/nolibc/sys.h @@ -23,6 +23,7 @@ #include <linux/prctl.h> #include <linux/resource.h> #include <linux/utsname.h> +#include <linux/signal.h> #include "arch.h" #include "errno.h" @@ -1226,6 +1227,23 @@ pid_t waitpid(pid_t pid, int *status, int options) /* + * int waitid(idtype_t idtype, id_t id, siginfo_t *infop, int options); + */ + +static __attribute__((unused)) +int sys_waitid(int which, pid_t pid, siginfo_t *infop, int options, struct rusage *rusage) +{ + return my_syscall5(__NR_waitid, which, pid, infop, options, rusage); +} + +static __attribute__((unused)) +int waitid(int which, pid_t pid, siginfo_t *infop, int options) +{ + return __sysret(sys_waitid(which, pid, infop, options, NULL)); +} + + +/* * ssize_t write(int fd, const void *buf, size_t count); */ |
