timeout_hardclock_update: enter timeout_mutex before reading uptime clock
authorcheloha <cheloha@openbsd.org>
Thu, 6 Jul 2023 23:24:37 +0000 (23:24 +0000)
committercheloha <cheloha@openbsd.org>
Thu, 6 Jul 2023 23:24:37 +0000 (23:24 +0000)
commit08261913ef8fa7cde1c769ff7a0ac7684cdc3d73
tree2f2abb8d01ace60901350d86b48027412542d225
parent228cff3439a5bf39f999c323247925eea35e723b
timeout_hardclock_update: enter timeout_mutex before reading uptime clock

We have no way of knowing how long we will spin before entering
timeout_mutex.  Enter timeout_mutex first, then wait until just before
we start dumping kclock buckets to read the uptime clock.
sys/kern/kern_timeout.c