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 [EMAIL PROTECTED] UNIX Systems Programmer/Administrator http://garage.freebsd.pl Am I Evil? Yes, I Am! http://cerber.sourceforge.net
pgp00000.pgp
Description: PGP signature