diff options
| author | Jeff Roberson <jeff@FreeBSD.org> | 2004-01-25 03:54:52 +0000 |
|---|---|---|
| committer | Jeff Roberson <jeff@FreeBSD.org> | 2004-01-25 03:54:52 +0000 |
| commit | 29bcc4514f48628e382391fba201db59745d2d0e (patch) | |
| tree | 5db1ead5d1c75b7e2ece1d370fa6708964bf49f8 /sys/kern/kern_condvar.c | |
| parent | 8dc10be885b3572d3e237d62efef0af9a78da183 (diff) | |
Notes
Diffstat (limited to 'sys/kern/kern_condvar.c')
| -rw-r--r-- | sys/kern/kern_condvar.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/sys/kern/kern_condvar.c b/sys/kern/kern_condvar.c index d95d9e2f89cc..580334a90be5 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); |
