Home | History | Annotate | Download | only in kern

Lines Matching defs:wpipe

209 	struct pipe *rpipe, *wpipe;
218 rpipe = wpipe = NULL;
221 (error = pipe_create(&wpipe, pipe_wr_cache, &nt))) {
225 wpipe->pipe_lock = rpipe->pipe_lock;
226 mutex_obj_hold(wpipe->pipe_lock);
247 wf->f_pipe = wpipe;
252 rpipe->pipe_peer = wpipe;
253 wpipe->pipe_peer = rpipe;
261 pipeclose(wpipe);
567 struct pipe *wpipe, *rpipe;
579 wpipe = rpipe->pipe_peer;
584 if (wpipe == NULL || (wpipe->pipe_state & PIPE_EOF) != 0) {
588 ++wpipe->pipe_busy;
591 if ((error = pipelock(wpipe, true)) != 0) {
592 --wpipe->pipe_busy;
593 if (wpipe->pipe_busy == 0) {
594 wpipe->pipe_state &= ~PIPE_RESTART;
595 cv_broadcast(&wpipe->pipe_draincv);
601 bp = &wpipe->pipe_buffer;
610 if (pipespace(wpipe, BIG_PIPE_SIZE) == 0)
678 cv_broadcast(&wpipe->pipe_rcv);
693 pipeselwakeup(wpipe, wpipe, POLL_IN);
704 if (wpipe->pipe_state & PIPE_EOF) {
709 pipeunlock(wpipe);
710 error = cv_wait_sig(&wpipe->pipe_wcv, lock);
711 (void)pipelock(wpipe, false);
714 wakeup_state = wpipe->pipe_state;
718 --wpipe->pipe_busy;
719 if (wpipe->pipe_busy == 0) {
720 wpipe->pipe_state &= ~PIPE_RESTART;
721 cv_broadcast(&wpipe->pipe_draincv);
724 cv_broadcast(&wpipe->pipe_rcv);
734 getnanotime(&wpipe->pipe_mtime);
740 pipeselwakeup(wpipe, wpipe, POLL_IN);
745 wpipe->pipe_state |= PIPE_SIGNALR;
747 pipeunlock(wpipe);
821 struct pipe *wpipe;
826 wpipe = rpipe->pipe_peer;
835 if (wpipe == NULL)
839 if ((wpipe->pipe_state & PIPE_EOF) || (
840 (wpipe->pipe_buffer.size - wpipe->pipe_buffer.cnt) >= PIPE_BUF))
843 eof |= (wpipe->pipe_state & PIPE_EOF);
846 if (wpipe == NULL || eof)
854 selrecord(curlwp, &wpipe->pipe_sel);
1069 struct pipe *wpipe;
1075 wpipe = rpipe->pipe_peer;
1079 (wpipe == NULL) || (wpipe->pipe_state & PIPE_EOF)) {
1096 struct pipe *wpipe;
1102 wpipe = rpipe->pipe_peer;
1104 if ((wpipe == NULL) || (wpipe->pipe_state & PIPE_EOF)) {
1109 kn->kn_data = wpipe->pipe_buffer.size - wpipe->pipe_buffer.cnt;