diff options
| author | Rhys Hiltner <rhys@justin.tv> | 2021-08-13 08:34:25 -0700 |
|---|---|---|
| committer | Michael Pratt <mpratt@google.com> | 2021-09-27 18:57:20 +0000 |
| commit | 3d795ea798edf0f9da4d2e33e15a58e59aa42e83 (patch) | |
| tree | b6fb94438c4e1c06e81c966075141d57385cf3d0 /src/runtime/sys_linux_riscv64.s | |
| parent | d4007aedfaf3f551f9ea7d5e2d2f86dcd2c4c990 (diff) | |
| download | go-3d795ea798edf0f9da4d2e33e15a58e59aa42e83.tar.xz | |
runtime: add timer_create syscalls for Linux
Updates #35057
Change-Id: Id702b502fa4e4005ba1e450a945bc4420a8a8b8c
Reviewed-on: https://go-review.googlesource.com/c/go/+/342052
Run-TryBot: Rhys Hiltner <rhys@justin.tv>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Michael Pratt <mpratt@google.com>
Trust: Than McIntosh <thanm@google.com>
Diffstat (limited to 'src/runtime/sys_linux_riscv64.s')
| -rw-r--r-- | src/runtime/sys_linux_riscv64.s | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/runtime/sys_linux_riscv64.s b/src/runtime/sys_linux_riscv64.s index ebcdd56a45..a3da46d136 100644 --- a/src/runtime/sys_linux_riscv64.s +++ b/src/runtime/sys_linux_riscv64.s @@ -48,6 +48,9 @@ #define SYS_sigaltstack 132 #define SYS_socket 198 #define SYS_tgkill 131 +#define SYS_timer_create 107 +#define SYS_timer_delete 111 +#define SYS_timer_settime 110 #define SYS_tkill 130 #define SYS_write 64 @@ -201,6 +204,35 @@ TEXT runtime·setitimer(SB),NOSPLIT|NOFRAME,$0-24 ECALL RET +// func timer_create(clockid int32, sevp *sigevent, timerid *int32) int32 +TEXT runtime·timer_create(SB),NOSPLIT,$0-28 + MOVW clockid+0(FP), A0 + MOV sevp+8(FP), A1 + MOV timerid+16(FP), A2 + MOV $SYS_timer_create, A7 + ECALL + MOVW A0, ret+24(FP) + RET + +// func timer_settime(timerid int32, flags int32, new, old *itimerspec) int32 +TEXT runtime·timer_settime(SB),NOSPLIT,$0-28 + MOVW timerid+0(FP), A0 + MOVW flags+4(FP), A1 + MOV new+8(FP), A2 + MOV old+16(FP), A3 + MOV $SYS_timer_settime, A7 + ECALL + MOVW A0, ret+24(FP) + RET + +// func timer_delete(timerid int32) int32 +TEXT runtime·timer_delete(SB),NOSPLIT,$0-12 + MOVW timerid+0(FP), A0 + MOV $SYS_timer_delete, A7 + ECALL + MOVW A0, ret+8(FP) + RET + // func mincore(addr unsafe.Pointer, n uintptr, dst *byte) int32 TEXT runtime·mincore(SB),NOSPLIT|NOFRAME,$0-28 MOV addr+0(FP), A0 |
