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_arm.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_arm.s')
| -rw-r--r-- | src/runtime/sys_linux_arm.s | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/runtime/sys_linux_arm.s b/src/runtime/sys_linux_arm.s index ae99810c10..3f30da7b54 100644 --- a/src/runtime/sys_linux_arm.s +++ b/src/runtime/sys_linux_arm.s @@ -45,6 +45,9 @@ #define SYS_epoll_create (SYS_BASE + 250) #define SYS_epoll_ctl (SYS_BASE + 251) #define SYS_epoll_wait (SYS_BASE + 252) +#define SYS_timer_create (SYS_BASE + 257) +#define SYS_timer_settime (SYS_BASE + 258) +#define SYS_timer_delete (SYS_BASE + 261) #define SYS_epoll_create1 (SYS_BASE + 357) #define SYS_pipe2 (SYS_BASE + 359) #define SYS_fcntl (SYS_BASE + 55) @@ -233,6 +236,32 @@ TEXT runtime·setitimer(SB),NOSPLIT,$0 SWI $0 RET +TEXT runtime·timer_create(SB),NOSPLIT,$0-16 + MOVW clockid+0(FP), R0 + MOVW sevp+4(FP), R1 + MOVW timerid+8(FP), R2 + MOVW $SYS_timer_create, R7 + SWI $0 + MOVW R0, ret+12(FP) + RET + +TEXT runtime·timer_settime(SB),NOSPLIT,$0-20 + MOVW timerid+0(FP), R0 + MOVW flags+4(FP), R1 + MOVW new+8(FP), R2 + MOVW old+12(FP), R3 + MOVW $SYS_timer_settime, R7 + SWI $0 + MOVW R0, ret+16(FP) + RET + +TEXT runtime·timer_delete(SB),NOSPLIT,$0-8 + MOVW timerid+0(FP), R0 + MOVW $SYS_timer_delete, R7 + SWI $0 + MOVW R0, ret+4(FP) + RET + TEXT runtime·mincore(SB),NOSPLIT,$0 MOVW addr+0(FP), R0 MOVW n+4(FP), R1 |
