github.com/akaros/go-akaros@v0.0.0-20181004170632-85005d477eab/src/runtime/parlib/gcc_akaros.h (about) 1 // Copyright 2013 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 #include <signal.h> 6 #include <time.h> 7 #include <parlib/alarm.h> 8 #include <sys/syscall.h> 9 10 typedef struct syscall gcc_syscall_arg_t; 11 12 typedef struct gcc_futex_arg { 13 int *uaddr; 14 int op; 15 int val; 16 struct timespec *timeout; 17 int *uaddr2; 18 int val3; 19 int retval; 20 } gcc_futex_arg_t; 21 22 #undef sa_handler 23 typedef void (*__sigaction_t) (int, siginfo_t *, void *); 24 25 struct parlib_sigaction { 26 __sigaction_t sa_sigact; 27 sigset_t sa_mask; 28 unsigned int sa_flags; 29 unsigned int padding; 30 void (*sa_restorer) (void); 31 }; 32 33 34 typedef struct gcc_sigaction_arg { 35 int sig; 36 struct parlib_sigaction *act; 37 struct parlib_sigaction *oact; 38 int ret; 39 } gcc_sigaction_arg_t; 40 41 typedef struct gcc_sigaltstack_arg { 42 void *ss_sp; 43 int ss_size; 44 int ss_flags; 45 } gcc_sigaltstack_arg_t; 46 47 typedef struct gcc_sigprocmask_arg { 48 int how; 49 sigset_t *set; 50 sigset_t *oset; 51 int retval; 52 } gcc_sigprocmask_arg_t; 53 54 typedef TAILQ_ENTRY(parlib_alarm_waiter) parlib_alarm_waiter_tailq_entry_t; 55 struct parlib_alarm_waiter { 56 uint64_t wake_up_time; /* tsc time */ 57 void (*func) (struct parlib_alarm_waiter *waiter); 58 void *data; 59 parlib_alarm_waiter_tailq_entry_t next; 60 bool on_tchain; 61 }; 62