epoll_create on x64
open an epoll file descriptor
sys_epoll_create(int size)
| number | 213 (0xd5) |
|---|---|
| abi | common |
| kconfig | CONFIG_EPOLL |
| family | epoll see the whole family on x64 |
| entry point | sys_epoll_create |
| since | Linux 3.3 or earlier (3.3 is the first release scanned for x64) |
| man page | epoll_create(2) |
| source | elixir.bootlin.com |
Registers
| register | value |
|---|---|
rax | 213, the syscall number |
rdi | int size |
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 254
- arm 250
- ia32 254
- x32 1073742037
- ppc64 236
- ppc 236
- s390x 249
- mips64 5207
- mipsn32 6207
- mipso32 4248
- alpha 407
- blackfin 255, removed in 4.17
- cris 254, removed in 4.17
- frv 254, removed in 4.17
- ia64 1243, removed in 6.7
- m32r 254, removed in 4.17
- m68k 249
- microblaze 254
- mn10300 254, removed in 4.17
- parisc 224
- score 1042, removed in 4.17
- sh 254
- sparc 193
- sparc64 193
- xtensa 20
Get this as JSON: https://api.syscall.sh/v2/syscalls/x64/epoll_create