Lines Matching refs:pipe_state
658 if (__improbable(cpipe->pipe_state & PIPE_DEAD)) { in pipepair_destroy_pipe()
662 cpipe->pipe_state |= PIPE_DEAD; in pipepair_destroy_pipe()
664 can_free = (pp->pp_rpipe.pipe_state & PIPE_DEAD) && in pipepair_destroy_pipe()
665 (pp->pp_wpipe.pipe_state & PIPE_DEAD); in pipepair_destroy_pipe()
681 while (cpipe->pipe_state & PIPE_LOCKFL) { in pipeio_lock()
682 cpipe->pipe_state |= PIPE_LWANT; in pipeio_lock()
689 cpipe->pipe_state |= PIPE_LOCKFL; in pipeio_lock()
699 cpipe->pipe_state &= ~PIPE_LOCKFL; in pipeio_unlock()
700 if (cpipe->pipe_state & PIPE_LWANT) { in pipeio_unlock()
701 cpipe->pipe_state &= ~PIPE_LWANT; in pipeio_unlock()
712 if (cpipe->pipe_state & PIPE_EOF) { in pipeselwakeup()
720 if (spipe && (spipe->pipe_state & PIPE_ASYNC) && spipe->pipe_pgid) { in pipeselwakeup()
823 if ((rpipe->pipe_state & (PIPE_DRAIN | PIPE_EOF)) || in pipe_read()
831 if (rpipe->pipe_state & PIPE_WANTW) { in pipe_read()
832 rpipe->pipe_state &= ~PIPE_WANTW; in pipe_read()
857 rpipe->pipe_state |= PIPE_WANTR; in pipe_read()
879 if ((rpipe->pipe_busy == 0) && (rpipe->pipe_state & PIPE_WANT)) { in pipe_read()
880 rpipe->pipe_state &= ~(PIPE_WANT | PIPE_WANTW); in pipe_read()
886 if (rpipe->pipe_state & PIPE_WANTW) { in pipe_read()
887 rpipe->pipe_state &= ~PIPE_WANTW; in pipe_read()
933 if (wpipe == NULL || (wpipe->pipe_state & (PIPE_DRAIN | PIPE_EOF)) || in pipe_write()
987 (wpipe->pipe_state & PIPE_WANT)) { in pipe_write()
988 wpipe->pipe_state &= ~(PIPE_WANT | PIPE_WANTR); in pipe_write()
1010 if ((wpipe->pipe_state & (PIPE_DRAIN | PIPE_EOF)) || in pipe_write()
1112 if (wpipe->pipe_state & PIPE_WANTR) { in pipe_write()
1113 wpipe->pipe_state &= ~PIPE_WANTR; in pipe_write()
1121 if ((wpipe->pipe_state & (PIPE_DRAIN | PIPE_EOF)) || in pipe_write()
1142 wpipe->pipe_state |= PIPE_WANTW; in pipe_write()
1153 if ((wpipe->pipe_busy == 0) && (wpipe->pipe_state & PIPE_WANT)) { in pipe_write()
1154 wpipe->pipe_state &= ~(PIPE_WANT | PIPE_WANTR); in pipe_write()
1162 if (wpipe->pipe_state & PIPE_WANTR) { in pipe_write()
1163 wpipe->pipe_state &= ~PIPE_WANTR; in pipe_write()
1213 mpipe->pipe_state |= PIPE_ASYNC; in pipe_ioctl()
1215 mpipe->pipe_state &= ~PIPE_ASYNC; in pipe_ioctl()
1271 if ((rpipe->pipe_state & PIPE_DIRECTW) || in pipe_select()
1273 (rpipe->pipe_state & (PIPE_DRAIN | PIPE_EOF)) || in pipe_select()
1283 wpipe->pipe_state |= PIPE_WSELECT; in pipe_select()
1285 if (wpipe == NULL || (wpipe->pipe_state & (PIPE_DRAIN | PIPE_EOF)) || in pipe_select()
1287 (((wpipe->pipe_state & PIPE_DIRECTW) == 0) && in pipe_select()
1347 cpipe->pipe_state &= ~PIPE_DRAIN; in pipeclose()
1348 cpipe->pipe_state |= PIPE_EOF; in pipeclose()
1352 cpipe->pipe_state |= PIPE_WANT; in pipeclose()
1371 ppipe->pipe_state &= ~(PIPE_DRAIN); in pipeclose()
1372 ppipe->pipe_state |= PIPE_EOF; in pipeclose()
1408 if ((rpipe->pipe_state & (PIPE_DRAIN | PIPE_EOF)) || in filt_pipe_draincommon()
1409 (wpipe == NULL) || (wpipe->pipe_state & (PIPE_DRAIN | PIPE_EOF))) { in filt_pipe_draincommon()
1746 pinfo->pipe_status = cpipe->pipe_state; in fill_pipeinfo()
1772 cpipe->pipe_state |= PIPE_DRAIN; in pipe_drain()
1773 cpipe->pipe_state &= ~(PIPE_WANTR | PIPE_WANTW); in pipe_drain()
1780 ppipe->pipe_state |= PIPE_DRAIN; in pipe_drain()
1781 ppipe->pipe_state &= ~(PIPE_WANTR | PIPE_WANTW); in pipe_drain()