clockintr_cpu_init: mask CQ_INTRCLOCK while advancing schedule
authorcheloha <cheloha@openbsd.org>
Thu, 20 Apr 2023 00:24:11 +0000 (00:24 +0000)
committercheloha <cheloha@openbsd.org>
Thu, 20 Apr 2023 00:24:11 +0000 (00:24 +0000)
commit5d42376813f3034d070cb21f9052029e8fa372b0
treeabeaa61cb2183bf2b4dccea57c420b5996ade177
parent2a675d814334aded85c4bd058132e80ee7e1f5c2
clockintr_cpu_init: mask CQ_INTRCLOCK while advancing schedule

Allowing the intrclock to fire in the midst of clockintr_cpu_init()
would complicate the function a lot.  However, in a future patch we
will need to enable intrclock operations in clockintr_advance(),
clockintr_cancel(), and clockintr_schedule().

We can avoid this conflict by masking CQ_INTRCLOCK while we're
updating the internal clockintrs in clockintr_cpu_init().  When we no
longer need clockintr_cpu_init(), this workaround will disappear.
sys/kern/kern_clockintr.c