syscall.sh / riscv64 / wait4
wait4
wait for process to change state, BSD style
sys_wait4(pid_t pid, int *stat_addr, int options, struct rusage *ru)
| number | 260 (0x104) |
|---|---|
| abi | 64 |
| entry point | sys_wait4 |
| since | Linux 4.15 |
| man page | wait4(2) |
| source | elixir.bootlin.com |
Registers
| register | value |
|---|---|
a7 | 260, the syscall number |
a0 | pid_t pid |
a1 | int *stat_addr |
a2 | int options |
a3 | struct rusage *ru |
a0 | the return value |
Then run ecall to enter the kernel.
Same syscall on other architectures
- x64 61
- x86 114
- arm64 260
- arm 114
- x32 1073741885
- loongarch64 260
- ppc64 114
- ppc 114
- s390x 114
- mips64 5059
- mipsn32 6059
- mipso32 4114
- alpha 365
- arc 260
- csky 260
- hexagon 260
- m68k 114
- microblaze 114
- nios2 260
- openrisc 260
- parisc 114
- sh 114
- sparc 7
- sparc64 7
- xtensa 121
Get this as JSON: https://api.syscall.sh/v2/syscalls/riscv64/wait4