epoll_create1 on x64
open an epoll file descriptor
sys_epoll_create1(int flags)
| number | 291 (0x123) |
|---|---|
| abi | common |
| kconfig | CONFIG_EPOLL |
| family | epoll see the whole family on x64 |
| entry point | sys_epoll_create1 |
| since | Linux 3.3 or earlier (3.3 is the first release scanned for x64) |
| man page | epoll_create1(2) |
| source | elixir.bootlin.com |
Registers
| register | value |
|---|---|
rax | 291, the syscall number |
rdi | int flags |
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 329
- arm64 20
- arm 357
- riscv64 20
- ia32 329
- x32 1073742115
- loongarch64 20
- ppc64 315
- ppc 315
- s390x 327
- mips64 5285
- mipsn32 6289
- mipso32 4326
- alpha 486
- arc 20
- blackfin 362, removed in 4.17
- cris 329, removed in 4.17
- csky 20
- frv 329, removed in 4.17
- hexagon 20
- ia64 1315, removed in 6.7
- m68k 325
- metag 20, removed in 4.17
- microblaze 341
- mn10300 330, removed in 4.17
- nds32 20, removed in 5.18
- nios2 20
- openrisc 20
- parisc 311
- score 20, removed in 4.17
- sh 329
- sparc 319
- sparc64 319
- tilegx 20, removed in 4.17
- tilepro 20, removed in 4.17
- xtensa 275
Get this as JSON: https://api.syscall.sh/v2/syscalls/x64/epoll_create1