Sysctls and mutexes.
Pawel Jakub Dawidek
nick at garage.freebsd.pl
Sun Jul 13 08:23:20 PDT 2003
On Sun, Jun 29, 2003 at 09:12:11AM +0200, Pawel Jakub Dawidek wrote:
+> I want to discuss two things about sysctls.
[...]
+> 2. Secound thing. I'm wondering if there is no need to and one more field
+> to those macros: mutex that protects given value. Then standard functions
+> sysctl_handle_*() could use those mutexes when accessing to those values.
+>
+> Look at sysctl creation in /sys/dev/sound/pcm/mixer.c in function
+> mixer_hwvol_init() or at sysctls in /sys/kern/kern_jail.c and many others
+> as I susspect.
+>
+> There is no need to break anything. We could create for now new macros:
+> SYSCTL_ADD_INT_MTX(), etc. that will create int sysctl, but with information
+> about its mutex. We should also teach sysctl_handle_int and friends how to
+> lock those mutexes and that they should ignore locking when this field is NULL.
Ok, I've prepared a patch for this:
http://www.freebsd.org/cgi/query-pr.cgi?pr=54439
Could someone review it, please?
--
Pawel Jakub Dawidek pawel at dawidek.net
UNIX Systems Programmer/Administrator http://garage.freebsd.pl
Am I Evil? Yes, I Am! http://cerber.sourceforge.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 305 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20030713/b34ab15b/attachment.bin
More information about the freebsd-hackers
mailing list