CVSROOT: /cvs
Module name: src
Changes by: [email protected] 2023/03/03 13:16:44
Modified files:
sys/kern : kern_clock.c
sys/conf : param.c
sys/sys : kernel.h
Log message:
initclocks: don't reinitialize ticks, jiffies at runtime
Various drivers use ticks/jiffies before initclocks(). It isn't
generally safe to reinitialize them at runtime. Hoist the conditional
definition of HZ from param.c into sys/kernel.h so we can see it from
kern_clock.c and statically initialize ticks/jiffies to the desired
offset.
With this change, timeouts scheduled before initclocks() do not all
fire immediately during the first softclock().
With input from kettenis@.
Link: https://marc.info/?l=openbsd-tech&m=167753870803378&w=2