pfind() and the proc structure
Roman Divacky
rdivacky at freebsd.org
Tue Apr 1 00:56:52 PDT 2008
On Mon, Mar 31, 2008 at 11:03:31PM -0700, Rao, Nikhil wrote:
> Hi List,
>
> The pfind(..) (in kern_proc.c) function below returns the proc structure
> for the PID passed in
>
> Say the thread that calls pfind() gets blocked at PROC_LOCK(p) (line 255
> below), in the meantime what prevents the process from exiting and
> deallocating the proc structure ? Maybe I am missing something simple or
> the answer requires knowledge of the mutex implementation.
thats what the allproc_lock is there for
More information about the freebsd-hackers
mailing list