Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 Jul 2003 17:28:46 +0200
From:      Pawel Jakub Dawidek <nick@garage.freebsd.pl>
To:        freebsd-hackers@freebsd.org
Cc:        abial@freebsd.org
Subject:   Re: Sysctls and mutexes.
Message-ID:  <20030713152846.GT4973@garage.freebsd.pl>
In-Reply-To: <20030629071211.GR7587@garage.freebsd.pl>
References:  <20030629071211.GR7587@garage.freebsd.pl>

next in thread | previous in thread | raw e-mail | index | archive | help

--+xp03240ql3JIIXA
Content-Type: text/plain; charset=iso-8859-2
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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 funct=
ions
+>    sysctl_handle_*() could use those mutexes when accessing to those val=
ues.
+>=20
+> 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.
+>=20
+> 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 informa=
tion
+> 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 i=
s NULL.

Ok, I've prepared a patch for this:

	http://www.freebsd.org/cgi/query-pr.cgi?pr=3D54439

Could someone review it, please?

--=20
Pawel Jakub Dawidek                       pawel@dawidek.net
UNIX Systems Programmer/Administrator     http://garage.freebsd.pl
Am I Evil? Yes, I Am!                     http://cerber.sourceforge.net

--+xp03240ql3JIIXA
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (FreeBSD)

iQCVAwUBPxF6rj/PhmMH/Mf1AQHTlgP8D+XJlX8qkK2NF84rZRVrWhnaBFhnBnMj
5IYbIf8kv4ZfCgGRiE88cAMAIe+kG2m9vza7MSck6tFl0C9Xrkf2Je5UpquyMYk8
fJPg79I2OtSoq4/FRz9naB0T6Utxk30cCeQbMhnzuNT9U/xsNqc7Gx+P8k6i8/Rp
T7s4i28dt3A=
=9Wxh
-----END PGP SIGNATURE-----

--+xp03240ql3JIIXA--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030713152846.GT4973>