set_tid_address on riscv64
set pointer to thread ID
sys_set_tid_address(int *tidptr)
| number | 96 (0x60) |
|---|---|
| abi | common |
| entry point | sys_set_tid_address |
| since | Linux 4.15 or earlier (4.15 is the first release scanned for riscv64) |
| man page | set_tid_address(2) |
| source | elixir.bootlin.com |
Registers
| register | value |
|---|---|
a7 | 96, the syscall number |
a0 | int *tidptr |
a0 | the return value |
Then run ecall to enter the kernel.
Same syscall on other architectures
- x64 218
- x86 258
- arm64 96
- arm 256
- ia32 258
- x32 1073742042
- loongarch64 96
- ppc64 232
- ppc 232
- s390x 252
- mips64 5212
- mipsn32 6213
- mipso32 4252
- alpha 411
- arc 96
- blackfin 259, removed in 4.17
- cris 258, removed in 4.17
- csky 96
- frv 258, removed in 4.17
- hexagon 96
- ia64 1233, removed in 6.7
- m32r 258, removed in 4.17
- m68k 253
- metag 96, removed in 4.17
- microblaze 258
- mn10300 258, removed in 4.17
- nds32 96, removed in 5.18
- nios2 96
- openrisc 96
- parisc 237
- score 96, removed in 4.17
- sh 258
- sparc 166
- sparc64 166
- tilegx 96, removed in 4.17
- tilepro 96, removed in 4.17
- xtensa 126
Get this as JSON: https://api.syscall.sh/v2/syscalls/riscv64/set_tid_address