syscall.sh / loongarch64 / 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 | 122 (0x7a) |
|---|---|
| abi | common |
| entry point | sys_sched_setaffinity |
| since | Linux 5.19 |
| man page | sched_setaffinity(2) |
| source | elixir.bootlin.com |
Registers
| register | value |
|---|---|
a7 | 122, the syscall number |
a0 | pid_t pid |
a1 | unsigned int len |
a2 | unsigned long *user_mask_ptr |
a0 | the return value |
Then run syscall 0 to enter the kernel.
Same syscall on other architectures
- x64 203
- x86 241
- arm64 122
- arm 241
- riscv64 122
- x32 1073742027
- 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/loongarch64/sched_setaffinity