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/defs_linux_arm.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/runtime/defs_linux_arm.go') diff --git a/src/runtime/defs_linux_arm.go b/src/runtime/defs_linux_arm.go index 5bc0916f8b..ec24d76326 100644 --- a/src/runtime/defs_linux_arm.go +++ b/src/runtime/defs_linux_arm.go @@ -29,6 +29,8 @@ const ( _SA_ONSTACK = 0x8000000 _SA_RESTORER = 0 // unused on ARM _SA_SIGINFO = 0x4 + _SI_KERNEL = 0x80 + _SI_TIMER = -0x2 _SIGHUP = 0x1 _SIGINT = 0x2 _SIGQUIT = 0x3 @@ -79,6 +81,10 @@ const ( _O_NONBLOCK = 0x800 _O_CLOEXEC = 0x80000 + _CLOCK_THREAD_CPUTIME_ID = 0x3 + + _SIGEV_THREAD_ID = 0x4 + _EPOLLIN = 0x1 _EPOLLOUT = 0x4 _EPOLLERR = 0x8 @@ -153,11 +159,24 @@ func (tv *timeval) set_usec(x int32) { tv.tv_usec = x } +type itimerspec struct { + it_interval timespec + it_value timespec +} + type itimerval struct { it_interval timeval it_value timeval } +type sigevent struct { + value uintptr + signo int32 + notify int32 + // below here is a union; sigev_notify_thread_id is the only field we use + sigev_notify_thread_id int32 +} + type siginfo struct { si_signo int32 si_errno int32 -- cgit v1.3