sched_rr_get_interval on x64
get the SCHED_RR interval for the named process
sys_sched_rr_get_interval(pid_t pid, struct __kernel_timespec *interval)
| number | 148 (0x94) |
|---|---|
| abi | common |
| entry point | sys_sched_rr_get_interval |
| since | Linux 3.3 or earlier (3.3 is the first release scanned for x64) |
| man page | sched_rr_get_interval(2) |
| source | elixir.bootlin.com |
Registers
| register | value |
|---|---|
rax | 148, the syscall number |
rdi | pid_t pid |
rsi | struct __kernel_timespec *interval |
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 161
- arm64 127
- arm 161
- riscv64 127
- ia32 161
- x32 1073741972
- loongarch64 127
- ppc64 161
- ppc 161
- s390x 161
- mips64 5145
- mipsn32 6145
- mipso32 4165
- alpha 337
- arc 127
- blackfin 161, removed in 4.17
- cris 161, removed in 4.17
- csky 127
- frv 161, removed in 4.17
- hexagon 127
- ia64 1167, removed in 6.7
- m32r 161, removed in 4.17
- m68k 161
- metag 127, removed in 4.17
- microblaze 161
- mn10300 161, removed in 4.17
- nds32 127, removed in 5.18
- nios2 127
- openrisc 127
- parisc 161
- score 127, removed in 4.17
- sh 161
- sparc 248
- sparc64 248
- tilegx 127, removed in 4.17
- tilepro 127, removed in 4.17
- xtensa 218
Get this as JSON: https://api.syscall.sh/v2/syscalls/x64/sched_rr_get_interval