sched_get_priority_max on x64
get static priority range
sys_sched_get_priority_max(int policy)
| number | 146 (0x92) |
|---|---|
| abi | common |
| entry point | sys_sched_get_priority_max |
| since | Linux 3.3 or earlier (3.3 is the first release scanned for x64) |
| man page | sched_get_priority_max(2) |
| source | elixir.bootlin.com |
Registers
| register | value |
|---|---|
rax | 146, the syscall number |
rdi | int policy |
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 159
- arm64 125
- arm 159
- riscv64 125
- ia32 159
- x32 1073741970
- loongarch64 125
- ppc64 159
- ppc 159
- s390x 159
- mips64 5143
- mipsn32 6143
- mipso32 4163
- alpha 335
- arc 125
- blackfin 159, removed in 4.17
- cris 159, removed in 4.17
- csky 125
- frv 159, removed in 4.17
- hexagon 125
- ia64 1165, removed in 6.7
- m32r 159, removed in 4.17
- m68k 159
- metag 125, removed in 4.17
- microblaze 159
- mn10300 159, removed in 4.17
- nds32 125, removed in 5.18
- nios2 125
- openrisc 125
- parisc 159
- score 125, removed in 4.17
- sh 159
- sparc 246
- sparc64 246
- tilegx 125, removed in 4.17
- tilepro 125, removed in 4.17
- xtensa 216
Get this as JSON: https://api.syscall.sh/v2/syscalls/x64/sched_get_priority_max