make the timeout_add_foo wrappers more consistent.
authordlg <dlg@openbsd.org>
Sun, 11 Aug 2024 00:49:34 +0000 (00:49 +0000)
committerdlg <dlg@openbsd.org>
Sun, 11 Aug 2024 00:49:34 +0000 (00:49 +0000)
commitb18b6c5536d245ef4e710009d703601813755b56
tree74349b674ca8b7721164695520e798d5d334da07
parentfa82e203a45b9902c42206de4b2a5041e1ae46d1
make the timeout_add_foo wrappers more consistent.

take uint64_t as the arg type for timeout_add_msec and timeout_add_usec
like we do for timeout_add_nsec now.

always calculate ticks using uint64_t, and factor out the range checks
on the resulting ticks value so it's done consistently.

ok claudio@
sys/kern/kern_timeout.c
sys/sys/timeout.h