clockintr: prepare to hoist clockqueue_init() out of clockintr_cpu_init()
authorcheloha <cheloha@openbsd.org>
Fri, 21 Apr 2023 16:35:20 +0000 (16:35 +0000)
committercheloha <cheloha@openbsd.org>
Fri, 21 Apr 2023 16:35:20 +0000 (16:35 +0000)
commit9a4914a606ea1e9caf571ba5f9b2abcf8f567bd8
tree7ffe0a76a95173c07b35fa2d3b17f8569e86b11f
parentd972f9c4943c622619ee762a7d28b17a6d12d588
clockintr: prepare to hoist clockqueue_init() out of clockintr_cpu_init()

Reorganize the initialization block in clockintr_cpu_init() so that it
doesn't break when clockqueue_init() is called separately:

- If CQ_INTRCLOCK is not set, this is the first clockintr_cpu_init()
  call and we can install the intrclock given as argument.

- If any of the internal clock interrupt handles are NULL, this is the
  first clockintr_cpu_init() call and we need to establish them.
sys/kern/kern_clockintr.c