diff options
author | David Xu <davidxu@FreeBSD.org> | 2003-03-14 03:52:16 +0000 |
---|---|---|
committer | David Xu <davidxu@FreeBSD.org> | 2003-03-14 03:52:16 +0000 |
commit | 9a4b78c9da6af5f3b964660727c416807a9accba (patch) | |
tree | 05812159fb3fe27c71c36674e705bbf9b331fc7f /sys/kern/kern_thread.c | |
parent | c6aa003c0d505e47bdfb3fa06d963fdd1f9593c0 (diff) | |
download | src-9a4b78c9da6af5f3b964660727c416807a9accba.tar.gz src-9a4b78c9da6af5f3b964660727c416807a9accba.zip |
Export current time when returning from never blocked syscall.
Notes
Notes:
svn path=/head/; revision=112222
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 5a5a96f3ce55..81b0ed54cea1 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); |