scheduler_start: move static timeout structs into callback functions
authorcheloha <cheloha@openbsd.org>
Sun, 17 Sep 2023 13:02:24 +0000 (13:02 +0000)
committercheloha <cheloha@openbsd.org>
Sun, 17 Sep 2023 13:02:24 +0000 (13:02 +0000)
commit6c64bd7f1b04b79ae87671e4d3ba562a84b05094
treec117c06be089213a77799feb81aaed271e83e580
parent12199e7c6c1482a1e3086dfaf4f53f88e5a9b24c
scheduler_start: move static timeout structs into callback functions

Move the schedcpu() and update_loadavg() timeout structs from
scheduler_start() into their respective callback functions and
statically initialize them with TIMEOUT_INITIALIZER(9).

The structs are already hidden from the global namespace and the
timeouts are already self-managing, so we may as well fully
consolidate things.

Thread: https://marc.info/?l=openbsd-tech&m=169488184019047&w=2

"Sure." claudio@
sys/kern/sched_bsd.c