HomeFreeBSD

Permit timed sleeps for threads other than thread0 before timers are working.

Description

Permit timed sleeps for threads other than thread0 before timers are working.

The callout subsystem already handles early callouts and schedules
the first clock interrupt appropriately based on the currently pending
callouts. The one nit to fix was that callouts scheduled via C_HARDCLOCK
during early boot could fire too early once timers were enabled as the
per-CPU base time is always zero until timers are initialized. The change
in callout_when() handles this case by using the current uptime as the
base time of the callout during bootup if the per-CPU base time is zero.

Reviewed by: kib
MFC after: 2 weeks
Sponsored by: Netflix

Details

Provenance
jhbAuthored on
Reviewer
kib
Parents
rS309147: Pull in r282174 from upstream llvm trunk (by Krzysztof Parzyszek):
Branches
Unknown
Tags
Unknown