summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_condvar.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/kern_condvar.c')
-rw-r--r--sys/kern/kern_condvar.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/sys/kern/kern_condvar.c b/sys/kern/kern_condvar.c
index d95d9e2..580334a 100644
--- a/sys/kern/kern_condvar.c
+++ b/sys/kern/kern_condvar.c
@@ -119,8 +119,7 @@ static __inline void
cv_switch(struct thread *td)
{
TD_SET_SLEEPING(td);
- td->td_proc->p_stats->p_ru.ru_nvcsw++;
- mi_switch();
+ mi_switch(SW_VOL);
CTR3(KTR_PROC, "cv_switch: resume thread %p (pid %d, %s)", td,
td->td_proc->p_pid, td->td_proc->p_comm);
}
@@ -370,8 +369,7 @@ cv_timedwait(struct cv *cvp, struct mtx *mp, int timo)
* Go back to sleep.
*/
TD_SET_SLEEPING(td);
- td->td_proc->p_stats->p_ru.ru_nivcsw++;
- mi_switch();
+ mi_switch(SW_INVOL);
td->td_flags &= ~TDF_TIMOFAIL;
}
@@ -447,8 +445,7 @@ cv_timedwait_sig(struct cv *cvp, struct mtx *mp, int timo)
* Go back to sleep.
*/
TD_SET_SLEEPING(td);
- td->td_proc->p_stats->p_ru.ru_nivcsw++;
- mi_switch();
+ mi_switch(SW_INVOL);
td->td_flags &= ~TDF_TIMOFAIL;
}
mtx_unlock_spin(&sched_lock);
OpenPOWER on IntegriCloud