diff options
author | davidxu <davidxu@FreeBSD.org> | 2005-10-23 04:22:56 +0000 |
---|---|---|
committer | davidxu <davidxu@FreeBSD.org> | 2005-10-23 04:22:56 +0000 |
commit | cf50eec401d4d7384b3badbb5929bc33849a5855 (patch) | |
tree | 0646598ac68425c9b342b7f7d89ec9d97e5673e1 /sys/kern/kern_exit.c | |
parent | 79343f4d094c11448cf9581def4af5ee487e1cb7 (diff) | |
download | FreeBSD-src-cf50eec401d4d7384b3badbb5929bc33849a5855.zip FreeBSD-src-cf50eec401d4d7384b3badbb5929bc33849a5855.tar.gz |
Implement POSIX timers. Current only CLOCK_REALTIME and CLOCK_MONOTONIC
clock are supported. I have plan to merge XSI timer ITIMER_REAL and other
two CPU timers into the new code, current three slots are available for
the XSI timers.
The SIGEV_THREAD notification type is not supported yet because our
sigevent struct lacks of two member fields:
sigev_notify_function
sigev_notify_attributes
I have found the sigevent is used in AIO, so I won't add the two members
unless the AIO code is adjusted.
Diffstat (limited to 'sys/kern/kern_exit.c')
-rw-r--r-- | sys/kern/kern_exit.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c index 66f37ca..399d369 100644 --- a/sys/kern/kern_exit.c +++ b/sys/kern/kern_exit.c @@ -207,8 +207,6 @@ retry: PROC_LOCK(p); stopprofclock(p); p->p_flag &= ~(P_TRACED | P_PPWAIT); - sigqueue_flush(&p->p_sigqueue); - sigqueue_flush(&td->td_sigqueue); /* * Stop the real interval timer. If the handler is currently @@ -221,8 +219,12 @@ retry: KASSERT(!timevalisset(&p->p_realtimer.it_value), ("realtime timer is still armed")); } + sigqueue_flush(&p->p_sigqueue); + sigqueue_flush(&td->td_sigqueue); PROC_UNLOCK(p); + itimers_event_hook(p, ITIMER_EV_EXIT); + /* * Reset any sigio structures pointing to us as a result of * F_SETOWN with our pid. |