Export current time when returning from never blocked syscall.

This commit is contained in:
David Xu 2003-03-14 03:52:16 +00:00
parent c6aa003c0d
commit 9a4b78c9da
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=112222
2 changed files with 16 additions and 2 deletions

View File

@ -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);

View File

@ -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);