* Fernando Apesteguía <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]>
 WWW: http://g-rave.nl/

Attachment: pgpGDJHYOuLMX.pgp
Description: PGP signature

Reply via email to