pause on x64
wait for signal
sys_pause(void)
| number | 34 (0x22) |
|---|---|
| abi | common |
| entry point | sys_pause |
| since | Linux 3.3 or earlier (3.3 is the first release scanned for x64) |
| man page | pause(2) |
| source | elixir.bootlin.com |
Registers
| register | value |
|---|---|
rax | 34, the syscall number |
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 29
- arm 29
- ia32 29
- x32 1073741858
- ppc64 29
- ppc 29
- s390x 29
- mips64 5033
- mipsn32 6033
- mipso32 4029
- blackfin 29, removed in 4.17
- cris 29, removed in 4.17
- frv 29, removed in 4.17
- m32r 29, removed in 4.17
- m68k 29
- microblaze 29
- mn10300 29, removed in 4.17
- parisc 29
- score 1061, removed in 4.17
- sh 29
- sparc 29
- sparc64 29
Get this as JSON: https://api.syscall.sh/v2/syscalls/x64/pause