Lines Matching refs:pipe
36 struct pipe_inode_info *pipe; in fifo_open() local
40 pipe = inode->i_pipe; in fifo_open()
41 if (!pipe) { in fifo_open()
43 pipe = alloc_pipe_info(inode); in fifo_open()
44 if (!pipe) in fifo_open()
46 inode->i_pipe = pipe; in fifo_open()
61 pipe->r_counter++; in fifo_open()
62 if (pipe->readers++ == 0) in fifo_open()
65 if (!pipe->writers) { in fifo_open()
69 filp->f_version = pipe->w_counter; in fifo_open()
72 wait_for_partner(inode, &pipe->w_counter); in fifo_open()
86 if ((filp->f_flags & O_NONBLOCK) && !pipe->readers) in fifo_open()
90 pipe->w_counter++; in fifo_open()
91 if (!pipe->writers++) in fifo_open()
94 if (!pipe->readers) { in fifo_open()
95 wait_for_partner(inode, &pipe->r_counter); in fifo_open()
110 pipe->readers++; in fifo_open()
111 pipe->writers++; in fifo_open()
112 pipe->r_counter++; in fifo_open()
113 pipe->w_counter++; in fifo_open()
114 if (pipe->readers == 1 || pipe->writers == 1) in fifo_open()
128 if (!--pipe->readers) in fifo_open()
129 wake_up_interruptible(&pipe->wait); in fifo_open()
134 if (!--pipe->writers) in fifo_open()
135 wake_up_interruptible(&pipe->wait); in fifo_open()
140 if (!pipe->readers && !pipe->writers) in fifo_open()