diff options
author | davidxu <davidxu@FreeBSD.org> | 2003-03-14 03:52:16 +0000 |
---|---|---|
committer | davidxu <davidxu@FreeBSD.org> | 2003-03-14 03:52:16 +0000 |
commit | c2573f692dfa390d9c16c08b8105aa4c65555b26 (patch) | |
tree | 05812159fb3fe27c71c36674e705bbf9b331fc7f /sys/kern/kern_thread.c | |
parent | 1cf4d0f1fdc08728789b51f2be82b51342e72c1d (diff) | |
download | FreeBSD-src-c2573f692dfa390d9c16c08b8105aa4c65555b26.zip FreeBSD-src-c2573f692dfa390d9c16c08b8105aa4c65555b26.tar.gz |
Export current time when returning from never blocked syscall.
Diffstat (limited to 'sys/kern/kern_thread.c')
-rw-r--r-- | sys/kern/kern_thread.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/kern/kern_thread.c b/sys/kern/kern_thread.c index 5a5a96f..81b0ed5 100644 --- a/sys/kern/kern_thread.c +++ b/sys/kern/kern_thread.c @@ -1603,11 +1603,18 @@ thread_userret(struct thread *td, struct trapframe *frame) mtx_lock_spin(&sched_lock); td->td_flags &= ~TDF_CAN_UNBIND; mtx_unlock_spin(&sched_lock); + ku = td->td_upcall; if ((p->p_flag & PS_NEEDSIGCHK) == 0 && (kg->kg_completed == NULL) && - (td->td_upcall->ku_flags & KUF_DOUPCALL) == 0) { + (ku->ku_flags & KUF_DOUPCALL) == 0) { thread_update_usr_ticks(td, 0); + nanotime(&ts); + error = copyout(&ts, + (caddr_t)&ku->ku_mailbox->km_timeofday, + sizeof(ts)); td->td_mailbox = 0; + if (error) + goto out; return (0); } error = thread_export_context(td); |