diff options
author | spew <devnull@localhost> | 2018-07-01 18:48:12 -0400 |
---|---|---|
committer | spew <devnull@localhost> | 2018-07-01 18:48:12 -0400 |
commit | 91d03436276fd2239670fdea902c761f31ea7a72 (patch) | |
tree | 6f5b8f0d3826d2897e541bbb7bbf3d6b03c03a88 /sys/include | |
parent | 9dc907361c8398c714fed81a65cd447803ae1a8d (diff) |
ape: an implemenation of getitimer setitimer
Diffstat (limited to 'sys/include')
-rw-r--r-- | sys/include/ape/signal.h | 4 | ||||
-rw-r--r-- | sys/include/ape/sys/time.h | 11 |
2 files changed, 14 insertions, 1 deletions
diff --git a/sys/include/ape/signal.h b/sys/include/ape/signal.h index 81884bddf..7d4e322bb 100644 --- a/sys/include/ape/signal.h +++ b/sys/include/ape/signal.h @@ -37,9 +37,11 @@ typedef int sig_atomic_t; #define SIGTSTP 18 /* interactive stop */ #define SIGTTIN 19 /* read from ctl tty by member of background */ #define SIGTTOU 20 /* write to ctl tty by member of background */ +#define SIGVTALRM 21 /* virtual alarm clock */ +#define SIGPROF 22 /* profiling alarm clock */ #ifdef _BSD_EXTENSION -#define NSIG 21 +#define NSIG 23 #endif #ifdef __cplusplus diff --git a/sys/include/ape/sys/time.h b/sys/include/ape/sys/time.h index 484fe9acb..a15aa3646 100644 --- a/sys/include/ape/sys/time.h +++ b/sys/include/ape/sys/time.h @@ -9,6 +9,11 @@ struct timeval { long tv_usec; }; +struct itimerval { + struct timeval it_interval; + struct timeval it_value; +}; + #ifdef _BSD_EXTENSION struct timezone { int tz_minuteswest; @@ -17,6 +22,12 @@ struct timezone { #endif #endif /* __TIMEVAL__ */ +#define ITIMER_REAL 0 +#define ITIMER_VIRTUAL 1 +#define ITIMER_PROF 3 + extern int gettimeofday(struct timeval *, struct timezone *); +int getitimer(int, struct itimerval *); +int setitimer(int, const struct itimerval *, struct itimerval *); #endif /* __SYSTIME_H */ |