Subject: Re: keeping the process start time in core at all times...
To: None <tech-kern@netbsd.org>
From: David Laight <david@l8s.co.uk>
List: tech-kern
Date: 12/02/2002 12:05:29
On Mon, Dec 02, 2002 at 10:41:42PM +1100, Simon Burge wrote:
> David Laight wrote:
> 
> > sysclt_doeproc() has the following structure:
> > 
> >     proclist_lock_read();
> > 
> >     for (p = LIST_FIRST(pd->pd_list); p != NULL; p = LIST_NEXT(p, p_list)) {
> > 	    ...
> > 	    error = copyout(&kproc2, dp2, ... )
> > 	    ...
> >     }
> >     proclist_unlock_read();
> > 
> > This means it can sleep with the proclist read locked.
> 
> See the calls to uvm_vslock() and uvm_vsunlock() in sys___sysctl() to
> lock down any user memory that is the destination of copyout().

Ok: however you will sleep in kcopy() (or elsewhere) if you
try to fault in the uarea.

	David

-- 
David Laight: david@l8s.co.uk