Date: Tue, 1 Apr 2008 09:56:24 +0200 From: Roman Divacky <rdivacky@freebsd.org> To: "Rao, Nikhil" <nikhil.rao@intel.com> Cc: freebsd-hackers@freebsd.org Subject: Re: pfind() and the proc structure Message-ID: <20080401075623.GA19770@freebsd.org> In-Reply-To: <12A5C15467D5B94F8E0FF265D9498ADD02CBF8FF@orsmsx419.amr.corp.intel.com> References: <20080329120018.0A8F5106567F@hub.freebsd.org> <12A5C15467D5B94F8E0FF265D9498ADD02CBF8FF@orsmsx419.amr.corp.intel.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080401075623.GA19770>