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
[-- Attachment #1 --] * Fernando Apesteguía <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. > > 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. > > 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. -- Ed Schouten <ed@fxq.nl> WWW: http://g-rave.nl/ [-- Attachment #2 --] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (FreeBSD) iEYEARECAAYFAkeKa2IACgkQ52SDGA2eCwXQqACfbuRDpg1XfCI/CR5Tk/dxXsJK p2IAnjd1OeGhpYYfkg/jOaW2D5+pm8af =jEwV -----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080113194954.GG80300>
