syscall.sh / x86 / 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 | 241 (0xf1) |
|---|---|
| abi | i386 |
| entry point | sys_sched_setaffinity |
| since | Linux 3.3 |
| man page | sched_setaffinity(2) |
| source | elixir.bootlin.com |
Registers
| register | value |
|---|---|
eax | 241, the syscall number |
ebx | pid_t pid |
ecx | unsigned int len |
edx | unsigned long *user_mask_ptr |
eax | the return value |
Then run int 0x80 to enter the kernel.
Same syscall on other architectures
- x64 203
- arm64 122
- arm 241
- riscv64 122
- x32 1073742027
- 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/x86/sched_setaffinity