cvs commit: src/sys/kern kern_proc.c kern_switch.c src/sys/sys sched.h src/sys/vm vm_glue.c

David Schultz das at
Mon Sep 20 20:47:35 PDT 2004

On Mon, Sep 20, 2004, David Schultz wrote:
> BTW, shouldn't PHOLD() assert that (p == curproc)?  I think this is
> the only race-free way to use it (as opposed to _PHOLD() with the
> process already locked).  Maybe PHOLD(p) should simply be renamed

Never mind.  It's also safe to PHOLD(uio->uio_td->td_proc), as is
done sys/ufs/ffs/ffs_rawread.c.  This is because the thread that
issued the I/O is known to be sleeping awaiting the I/O
completion, so the proc reference must be valid.  Not sure what
happens with AIO...

More information about the cvs-src mailing list