syscall.sh / riscv64 / gettimeofday
gettimeofday
get / set time
sys_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz)
| number | 169 (0xa9) |
|---|---|
| abi | 64 |
| entry point | sys_gettimeofday |
| since | Linux 4.15 |
| man page | gettimeofday(2) |
| source | elixir.bootlin.com |
Registers
| register | value |
|---|---|
a7 | 169, the syscall number |
a0 | struct __kernel_old_timeval *tv |
a1 | struct timezone *tz |
a0 | the return value |
Then run ecall to enter the kernel.
Same syscall on other architectures
- x64 96
- x86 78
- arm64 169
- arm 78
- x32 1073741920
- loongarch64 169
- ppc64 78
- ppc 78
- s390x 78
- mips64 5094
- mipsn32 6094
- mipso32 4078
- alpha 359
- arc 169
- csky 169
- hexagon 169
- m68k 78
- microblaze 78
- nios2 169
- openrisc 169
- parisc 78
- sh 78
- sparc 116
- sparc64 116
- xtensa 192
Get this as JSON: https://api.syscall.sh/v2/syscalls/riscv64/gettimeofday