syscall.sh / x32 / sched_setaffinity
sched_setaffinity
set and get a thread's CPU affinity mask
sys_sched_setaffinity(pid_t pid, unsigned int len, unsigned long *user_mask_ptr)
| number | 1073742027 (0x400000cb) |
|---|---|
| abi | common |
| entry point | sys_sched_setaffinity |
| since | Linux 3.4 |
| man page | sched_setaffinity(2) |
| source | elixir.bootlin.com |
Registers
| register | value |
|---|---|
rax | 1073742027, the syscall number |
rdi | pid_t pid |
rsi | unsigned int len |
rdx | unsigned long *user_mask_ptr |
rax | the return value |
Then run syscall to enter the kernel.
Same syscall on other architectures
- x64 203
- x86 241
- arm64 122
- arm 241
- riscv64 122
- loongarch64 122
- ppc64 222
- ppc 222
- s390x 239
- mips64 5195
- mipsn32 6195
- mipso32 4239
- alpha 395
- arc 122
- csky 122
- hexagon 122
- m68k 311
- microblaze 241
- nios2 122
- openrisc 122
- parisc 211
- sh 241
- sparc 261
- sparc64 261
- xtensa 156
Get this as JSON: https://api.syscall.sh/v2/syscalls/x32/sched_setaffinity