Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 Jan 2008 20:49:54 +0100
From:      Ed Schouten <ed@fxq.nl>
To:        Fernando =?iso-8859-1?Q?Apestegu=EDa?= <fernando.apesteguia@gmail.com>
Cc:        FreeBSD Hackers <freebsd-hackers@freebsd.org>
Subject:   Re: mutex lock for filesystem list.
Message-ID:  <20080113194954.GG80300@hoeg.nl>
In-Reply-To: <1bd550a00801131034o2999b85eu589cd8ee18a114ea@mail.gmail.com>
References:  <1bd550a00801131034o2999b85eu589cd8ee18a114ea@mail.gmail.com>

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

--jk/5KjyVsvxWSMIA
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

* Fernando Apestegu=EDa <fernando.apesteguia@gmail.com> wrote:
> I'm trying to write a patch to add a file to the linprocfs. This file
> provides the list of filesystems present in the kernel.
>=20
> Though I was able to create the file and traverse the list, it's
> clearly unsafe. I would like to know wich semaphore I should lock
> cause I can't find it in the kernel code.
>=20
> In addition I'd like to know if there is a book similar to the
> Understanding the Linux kernel, but for freebsd. What is the best
> information source to get introduced in the freebsd kernel programming
> (apart of the code itself)?

You're probably looking through the mountlist? Then you need to make
sure you lock the mountlist_mtx. See src/sys/kern/vfs_mount.c.

--=20
 Ed Schouten <ed@fxq.nl>
 WWW: http://g-rave.nl/

--jk/5KjyVsvxWSMIA
Content-Type: application/pgp-signature
Content-Disposition: inline

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

iEYEARECAAYFAkeKa2IACgkQ52SDGA2eCwXQqACfbuRDpg1XfCI/CR5Tk/dxXsJK
p2IAnjd1OeGhpYYfkg/jOaW2D5+pm8af
=jEwV
-----END PGP SIGNATURE-----

--jk/5KjyVsvxWSMIA--



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