When and when not to use CTLFLAG_MPSAFE with the SYSCTL macros..?

Garrett Cooper yaneurabeya at gmail.com
Tue Aug 4 22:47:29 UTC 2015


Hi,
	I’ve been trying to figure out (because sysctl(9) is lacking) when to use CTLFLAG_MPSAFE. Is it strictly when dealing with SYSCTL_PROC handlers that do proper locking of shared resources, or are there other nuances that need to be handled?
	I’m also asking because SYSCTL_UQUAD, for instance, explicitly uses CTLFLAG_MPSAFE in the handler, which is a bit confusing.
Thanks!
-NGie


More information about the freebsd-hackers mailing list