epoll_pwait2 on x64
wait for an I/O event on an epoll file descriptor
sys_epoll_pwait2(int epfd, struct epoll_event *events, int maxevents, const struct __kernel_timespec *timeout, const sigset_t *sigmask, size_t sigsetsize)
| number | 441 (0x1b9) |
|---|---|
| abi | common |
| kconfig | CONFIG_EPOLL |
| family | epoll see the whole family on x64 |
| entry point | sys_epoll_pwait2 |
| since | Linux 5.11 |
| man page | epoll_pwait2(2) |
| source | elixir.bootlin.com |
Registers
| register | value |
|---|---|
rax | 441, the syscall number |
rdi | int epfd |
rsi | struct epoll_event *events |
rdx | int maxevents |
r10 | const struct __kernel_timespec *timeout |
r8 | const sigset_t *sigmask |
r9 | size_t sigsetsize |
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 441
- arm64 441
- arm 441
- riscv64 441
- ia32 441
- x32 1073742265
- loongarch64 441
- ppc64 441
- ppc 441
- s390x 441
- mips64 5441
- mipsn32 6441
- mipso32 4441
- alpha 551
- arc 441
- csky 441
- hexagon 441
- ia64 1465, removed in 6.7
- m68k 441
- microblaze 441
- nds32 441, removed in 5.18
- nios2 441
- openrisc 441
- parisc 441
- sh 441
- sparc 441
- sparc64 441
- xtensa 441
Get this as JSON: https://api.syscall.sh/v2/syscalls/x64/epoll_pwait2