sched_getparam on x64
set and get scheduling parameters
sys_sched_getparam(pid_t pid, struct sched_param *param)
| number | 143 (0x8f) |
|---|---|
| abi | common |
| entry point | sys_sched_getparam |
| since | Linux 3.3 or earlier (3.3 is the first release scanned for x64) |
| man page | sched_getparam(2) |
| source | elixir.bootlin.com |
Registers
| register | value |
|---|---|
rax | 143, the syscall number |
rdi | pid_t pid |
rsi | struct sched_param *param |
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 155
- arm64 121
- arm 155
- riscv64 121
- ia32 155
- x32 1073741967
- loongarch64 121
- ppc64 155
- ppc 155
- s390x 155
- mips64 5140
- mipsn32 6140
- mipso32 4159
- alpha 331
- arc 121
- blackfin 155, removed in 4.17
- cris 155, removed in 4.17
- csky 121
- frv 155, removed in 4.17
- hexagon 121
- ia64 1160, removed in 6.7
- m32r 155, removed in 4.17
- m68k 155
- metag 121, removed in 4.17
- microblaze 155
- mn10300 155, removed in 4.17
- nds32 121, removed in 5.18
- nios2 121
- openrisc 121
- parisc 155
- score 121, removed in 4.17
- sh 155
- sparc 242
- sparc64 242
- tilegx 121, removed in 4.17
- tilepro 121, removed in 4.17
- xtensa 213
Get this as JSON: https://api.syscall.sh/v2/syscalls/x64/sched_getparam