sched_setaffinity on score
set and get a thread's CPU affinity mask
sys_sched_setaffinity(pid_t pid, unsigned int len, unsigned long *user_mask_ptr)
| number | 122 (0x7a) |
|---|---|
| abi | common |
| entry point | sys_sched_setaffinity |
| since | Linux 3.7 or earlier (3.7 is the first release scanned for score) |
| man page | sched_setaffinity(2) |
| source | elixir.bootlin.com |
Registers
| register | value |
|---|---|
r27 | 122, the syscall number |
r4 | pid_t pid |
r5 | unsigned int len |
r6 | unsigned long *user_mask_ptr |
r4 | the return value |
Then run syscall to enter the kernel.
r7 is the error flag and r4 then holds the positive error number.
This architecture was removed from the Linux kernel in Linux 4.17. The newest release with a syscall table here is Linux 4.16. The other removed architectures live on the historical architectures page.
Same syscall on other architectures
- x64 203
- x86 241
- arm64 122
- arm 241
- riscv64 122
- ia32 241
- x32 1073742027
- loongarch64 122
- ppc64 222
- ppc 222
- s390x 239
- mips64 5195
- mipsn32 6195
- mipso32 4239
- alpha 395
- arc 122
- blackfin 241, removed in 4.17
- cris 241, removed in 4.17
- csky 122
- frv 241, removed in 4.17
- hexagon 122
- ia64 1231, removed in 6.7
- m32r 241, removed in 4.17
- m68k 311
- metag 122, removed in 4.17
- microblaze 241
- mn10300 241, removed in 4.17
- nds32 122, removed in 5.18
- nios2 122
- openrisc 122
- parisc 211
- sh 241
- sparc 261
- sparc64 261
- tilegx 122, removed in 4.17
- tilepro 122, removed in 4.17
- xtensa 156
Get this as JSON: https://api.syscall.sh/v2/syscalls/score/sched_setaffinity?kernel=all