Lines Matching refs:fpipe
139 struct pipe *fpipe;
149 pipe_named_ctor(&fpipe, td);
151 fip->fi_pipe = fpipe;
152 fpipe->pipe_wgen = fip->fi_readers = fip->fi_writers = 0;
156 fpipe = fip->fi_pipe;
157 KASSERT(fpipe != NULL, ("fifo_open: pipe is NULL"));
164 PIPE_LOCK(fpipe);
168 fpipe->pipe_state &= ~PIPE_EOF;
172 fp->f_seqcount = fpipe->pipe_wgen - fip->fi_writers;
176 PIPE_UNLOCK(fpipe);
183 fpipe->pipe_state &= ~PIPE_EOF;
191 error = msleep(&fip->fi_readers, PIPE_MTX(fpipe),
197 PIPE_LOCK(fpipe);
198 fpipe->pipe_state |= PIPE_EOF;
199 if (fpipe->pipe_state & PIPE_WANTW)
200 wakeup(fpipe);
201 PIPE_UNLOCK(fpipe);
206 PIPE_LOCK(fpipe);
215 error = msleep(&fip->fi_writers, PIPE_MTX(fpipe),
221 PIPE_LOCK(fpipe);
222 fpipe->pipe_state |= PIPE_EOF;
223 if (fpipe->pipe_state & PIPE_WANTR)
224 wakeup(fpipe);
225 fpipe->pipe_wgen++;
226 PIPE_UNLOCK(fpipe);
236 PIPE_LOCK(fpipe);
239 PIPE_UNLOCK(fpipe);
242 finit(fp, fp->f_flag, DTYPE_FIFO, fpipe, &pipeops);