From 3d795ea798edf0f9da4d2e33e15a58e59aa42e83 Mon Sep 17 00:00:00 2001 From: Rhys Hiltner Date: Fri, 13 Aug 2021 08:34:25 -0700 Subject: 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 TryBot-Result: Go Bot Reviewed-by: Michael Pratt Trust: Than McIntosh --- src/runtime/sys_linux_386.s | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'src/runtime/sys_linux_386.s') diff --git a/src/runtime/sys_linux_386.s b/src/runtime/sys_linux_386.s index 3ae5a9099f..6df812234c 100644 --- a/src/runtime/sys_linux_386.s +++ b/src/runtime/sys_linux_386.s @@ -56,6 +56,9 @@ #define SYS_epoll_create 254 #define SYS_epoll_ctl 255 #define SYS_epoll_wait 256 +#define SYS_timer_create 259 +#define SYS_timer_settime 260 +#define SYS_timer_delete 263 #define SYS_clock_gettime 265 #define SYS_tgkill 270 #define SYS_epoll_create1 329 @@ -210,6 +213,32 @@ TEXT runtime·setitimer(SB),NOSPLIT,$0-12 INVOKE_SYSCALL RET +TEXT runtime·timer_create(SB),NOSPLIT,$0-16 + MOVL $SYS_timer_create, AX + MOVL clockid+0(FP), BX + MOVL sevp+4(FP), CX + MOVL timerid+8(FP), DX + INVOKE_SYSCALL + MOVL AX, ret+12(FP) + RET + +TEXT runtime·timer_settime(SB),NOSPLIT,$0-20 + MOVL $SYS_timer_settime, AX + MOVL timerid+0(FP), BX + MOVL flags+4(FP), CX + MOVL new+8(FP), DX + MOVL old+12(FP), SI + INVOKE_SYSCALL + MOVL AX, ret+16(FP) + RET + +TEXT runtime·timer_delete(SB),NOSPLIT,$0-8 + MOVL $SYS_timer_delete, AX + MOVL timerid+0(FP), BX + INVOKE_SYSCALL + MOVL AX, ret+4(FP) + RET + TEXT runtime·mincore(SB),NOSPLIT,$0-16 MOVL $SYS_mincore, AX MOVL addr+0(FP), BX -- cgit v1.3