Allow resursion on the pipe mutex because filt_piperead() and filt_pipewrite()

can be called both with and without the pipe mutex held.  (For example,
if called by pipeselwakeup(), it is held.  Whereas, if called by kqueue_scan(),
it is not.)

Reviewed by:	alfred
This commit is contained in:
Alan Cox 2002-03-27 21:47:50 +00:00
parent 8899023f66
commit cd430164f1

View File

@ -265,7 +265,7 @@ pipe(td, uap)
td->td_retval[1] = fd;
rpipe->pipe_peer = wpipe;
wpipe->pipe_peer = rpipe;
mtx_init(pmtx, "pipe mutex", MTX_DEF);
mtx_init(pmtx, "pipe mutex", MTX_DEF | MTX_RECURSE);
rpipe->pipe_mtxp = wpipe->pipe_mtxp = pmtx;
fdrop(rf, td);