summaryrefslogtreecommitdiffstats
path: root/sys/sys/timers.h
diff options
context:
space:
mode:
authordavidxu <davidxu@FreeBSD.org>2005-10-30 02:56:08 +0000
committerdavidxu <davidxu@FreeBSD.org>2005-10-30 02:56:08 +0000
commit728466f71266127ca9858811086217136f83f146 (patch)
treed48e1b85529efd639c3d3b692210e7426040330a /sys/sys/timers.h
parent7ed917d56c1ca17c67ddecc4956c2c60c422d4c1 (diff)
downloadFreeBSD-src-728466f71266127ca9858811086217136f83f146.zip
FreeBSD-src-728466f71266127ca9858811086217136f83f146.tar.gz
Let itimer store itimerspec instead of itimerval, so I don't have to
convert to or from timeval frequently. Introduce function itimer_accept() to ack a timer signal in signal acceptance code, this allows us to return more fresh overrun counter than at signal generating time. while POSIX says: "the value returned by timer_getoverrun() shall apply to the most recent expiration signal delivery or acceptance for the timer,.." I prefer returning it at acceptance time. Introduce SIGEV_THREAD_ID notification mode, it is used by thread libary to request kernel to deliver signal to a specified thread, and in turn, the thread library may use the mechanism to implement SIGEV_THREAD which is required by POSIX. Timer signal is managed by timer code, so it can not fail even if signal queue is full filled by sigqueue syscall.
Diffstat (limited to 'sys/sys/timers.h')
-rw-r--r--sys/sys/timers.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/sys/timers.h b/sys/sys/timers.h
index 18434fa5..8a2d771 100644
--- a/sys/sys/timers.h
+++ b/sys/sys/timers.h
@@ -47,7 +47,7 @@
struct itimer {
struct mtx it_mtx;
struct sigevent it_sigev;
- struct itimerval it_time;
+ struct itimerspec it_time;
struct proc *it_proc;
int it_flags;
int it_usecount;
@@ -113,6 +113,6 @@ struct kclock {
#define ITIMER_EV_EXIT 1
void itimers_event_hook(struct proc *p, int event);
-
+int itimer_accept(struct proc *p, timer_t tid, ksiginfo_t *ksi);
#endif
#endif /* !_SYS_TIMERS_H_ */
OpenPOWER on IntegriCloud