Changeset View
Changeset View
Standalone View
Standalone View
head/sys/kern/subr_sleepqueue.c
Show First 20 Lines • Show All 580 Lines • ▼ Show 20 Lines | sleepq_check_timeout(void) | ||||
if (td->td_flags & TDF_TIMOFAIL) | if (td->td_flags & TDF_TIMOFAIL) | ||||
td->td_flags &= ~TDF_TIMOFAIL; | td->td_flags &= ~TDF_TIMOFAIL; | ||||
/* | /* | ||||
* If callout_stop() fails, then the timeout is running on | * If callout_stop() fails, then the timeout is running on | ||||
* another CPU, so synchronize with it to avoid having it | * another CPU, so synchronize with it to avoid having it | ||||
* accidentally wake up a subsequent sleep. | * accidentally wake up a subsequent sleep. | ||||
*/ | */ | ||||
else if (callout_stop(&td->td_slpcallout) == 0) { | else if (_callout_stop_safe(&td->td_slpcallout, CS_MIGRBLOCK, NULL) | ||||
== 0) { | |||||
td->td_flags |= TDF_TIMEOUT; | td->td_flags |= TDF_TIMEOUT; | ||||
TD_SET_SLEEPING(td); | TD_SET_SLEEPING(td); | ||||
mi_switch(SW_INVOL | SWT_SLEEPQTIMO, NULL); | mi_switch(SW_INVOL | SWT_SLEEPQTIMO, NULL); | ||||
} | } | ||||
return (0); | return (0); | ||||
} | } | ||||
/* | /* | ||||
▲ Show 20 Lines • Show All 650 Lines • Show Last 20 Lines |