io_pgetevents on x64
sys_io_pgetevents(aio_context_t ctx_id, long min_nr, long nr, struct io_event *events, struct __kernel_timespec *timeout, const struct __aio_sigset *usig)
| number | 333 (0x14d) |
|---|---|
| abi | common |
| kconfig | CONFIG_AIO |
| family | aio see the whole family on x64 |
| entry point | sys_io_pgetevents |
| since | Linux 4.18 |
| source | elixir.bootlin.com |
Registers
| register | value |
|---|---|
rax | 333, the syscall number |
rdi | aio_context_t ctx_id |
rsi | long min_nr |
rdx | long nr |
r10 | struct io_event *events |
r8 | struct __kernel_timespec *timeout |
r9 | const struct __aio_sigset *usig |
rax | the return value |
Then run syscall to enter the kernel.
The syscall instruction clobbers rcx (the return address lands in rcx) and r11 (the flags land in r11).
Since Linux 5.14 the kernel reads the syscall number from eax and ignores the upper 32 bits of rax. Older kernels fail with ENOSYS when those bits are not zero, and mov eax, N clears them, so it works on both.
Same syscall on other architectures
- x86 385
- arm64 292
- arm 399
- riscv64 292
- ia32 385
- x32 1073742157
- loongarch64 292
- ppc64 388
- ppc 388
- s390x 382
- mips64 5328
- mipsn32 6332
- mipso32 4368
- alpha 523
- arc 292
- csky 292
- hexagon 292
- ia64 1351, removed in 6.7
- microblaze 399
- nds32 292, removed in 5.18
- nios2 292
- openrisc 292
- parisc 350
- sparc 361
- sparc64 361
Get this as JSON: https://api.syscall.sh/v2/syscalls/x64/io_pgetevents