HomeFreeBSD

timecounter: Lock the timecounter list

Description

timecounter: Lock the timecounter list

Timecounter registration is dynamic, i.e., there is no requirement that
timecounters must be registered during single-threaded boot. Loadable
drivers may in principle register timecounters (which can be switched to
automatically). Timecounters cannot be unregistered, though this could
be implemented.

Registered timecounters belong to a global linked list. Add a mutex to
synchronize insertions and the traversals done by (mpsafe) sysctl
handlers. No functional change intended.

Reviewed by: imp, kib
Sponsored by: The FreeBSD Foundation

(cherry picked from commit 621fd9dcb2d83daab477c130bc99b905f6fc27dc)

Details

Provenance
markjAuthored on Oct 16 2021, 1:46 PM
Parents
rGacbd8022ae23: cpuset(9): Add CPU_FOREACH_IS(SET|CLR) and modify consumers to use it
Branches
Unknown
Tags
Unknown