1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-02-08 00:36:10 +00:00

Fix failure to correctly transition back to sleep mode.

This commit is contained in:
Julian Elischer 2002-07-02 05:33:46 +00:00
parent 4ec593593a
commit d5cb7e14f6
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=99247

View File

@ -394,8 +394,10 @@ cv_timedwait(struct cv *cvp, struct mtx *mp, int timo)
/* /*
* Work around race with cv_timedwait_end similar to that * Work around race with cv_timedwait_end similar to that
* between msleep and endtsleep. * between msleep and endtsleep.
* Go back to sleep.
*/ */
td->td_flags |= TDF_TIMEOUT; td->td_flags |= TDF_TIMEOUT;
td->td_state = TDS_SLP;
td->td_proc->p_stats->p_ru.ru_nivcsw++; td->td_proc->p_stats->p_ru.ru_nivcsw++;
mi_switch(); mi_switch();
} }
@ -470,8 +472,10 @@ cv_timedwait_sig(struct cv *cvp, struct mtx *mp, int timo)
/* /*
* Work around race with cv_timedwait_end similar to that * Work around race with cv_timedwait_end similar to that
* between msleep and endtsleep. * between msleep and endtsleep.
* Go back to sleep.
*/ */
td->td_flags |= TDF_TIMEOUT; td->td_flags |= TDF_TIMEOUT;
td->td_state = TDS_SLP;
td->td_proc->p_stats->p_ru.ru_nivcsw++; td->td_proc->p_stats->p_ru.ru_nivcsw++;
mi_switch(); mi_switch();
} }