pselect6 on x64
synchronous I/O multiplexing
sys_pselect6(int n, fd_set *inp, fd_set *outp, fd_set *exp, struct __kernel_timespec *tsp, void *sig)
| number | 270 (0x10e) |
|---|---|
| abi | common |
| entry point | sys_pselect6 |
| since | Linux 3.3 or earlier (3.3 is the first release scanned for x64) |
| man page | pselect6(2) |
| source | elixir.bootlin.com |
Registers
| register | value |
|---|---|
rax | 270, the syscall number |
rdi | int n |
rsi | fd_set *inp |
rdx | fd_set *outp |
r10 | fd_set *exp |
r8 | struct __kernel_timespec *tsp |
r9 | void *sig |
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 308
- arm64 72
- arm 335
- riscv64 72
- ia32 308
- x32 1073742094
- loongarch64 72
- ppc64 280
- ppc 280
- s390x 301
- mips64 5260
- mipsn32 6264
- mipso32 4301
- alpha 463
- arc 72
- blackfin 308, removed in 4.17
- cris 308, removed in 4.17
- csky 72
- frv 308, removed in 4.17
- hexagon 72
- ia64 1294, removed in 6.7
- m32r 308, removed in 4.17
- m68k 301
- metag 72, removed in 4.17
- microblaze 308
- mn10300 309, removed in 4.17
- nds32 72, removed in 5.18
- nios2 72
- openrisc 72
- parisc 273
- score 72, removed in 4.17
- sh 308
- sparc 297
- sparc64 297
- tilegx 72, removed in 4.17
- tilepro 72, removed in 4.17
- xtensa 272
Get this as JSON: https://api.syscall.sh/v2/syscalls/x64/pselect6