Lines Matching defs:pipe

18  *	struct pipe_buffer - a linux kernel pipe buffer
19 * @page: the page containing the data for the pipe buffer
23 * @flags: pipe buffer flags. See above.
35 * struct pipe_inode_info - a linux kernel pipe
37 * @rd_wait: reader wait point in case of empty pipe
38 * @wr_wait: writer wait point in case of full pipe
44 * @nr_accounted: The amount this pipe accounts for in user->pipe_bufs
46 * @readers: number of current readers of this pipe
47 * @writers: number of current writers of this pipe
48 * @files: number of struct file referring this pipe (protected by ->i_lock)
51 * @poll_usage: is this pipe used for epoll, which has crazy wakeups?
54 * @bufs: the circular array of pipe buffers
55 * @user: the user who created this pipe
56 * @watch_queue: If this pipe is a watch_queue, this is the stuff for that
92 * the meaning of each operation. Also see the kerneldoc in fs/pipe.c for the
93 * pipe and generic variants of these hooks.
97 * ->confirm() verifies that the data in the pipe buffer is there
98 * and that the contents are good. If the pages in the pipe belong
106 * When the contents of this pipe buffer has been completely
112 * Attempt to take ownership of the pipe buffer and its contents.
114 * of the pipe (the buf->page) is locked and now completely owned by the
122 * Get a reference to the pipe buffer.
128 * pipe_has_watch_queue - Check whether the pipe is a watch_queue,
130 * @pipe: The pipe to check
132 * Return: true if pipe is a watch queue, false otherwise.
134 static inline bool pipe_has_watch_queue(const struct pipe_inode_info *pipe)
137 return pipe->watch_queue != NULL;
144 * pipe_empty - Return true if the pipe is empty
145 * @head: The pipe ring head pointer
146 * @tail: The pipe ring tail pointer
154 * pipe_occupancy - Return number of slots used in the pipe
155 * @head: The pipe ring head pointer
156 * @tail: The pipe ring tail pointer
164 * pipe_full - Return true if the pipe is full
165 * @head: The pipe ring head pointer
166 * @tail: The pipe ring tail pointer
176 * pipe_buf - Return the pipe buffer for the specified slot in the pipe ring
177 * @pipe: The pipe to access
180 static inline struct pipe_buffer *pipe_buf(const struct pipe_inode_info *pipe,
183 return &pipe->bufs[slot & (pipe->ring_size - 1)];
187 * pipe_head_buf - Return the pipe buffer at the head of the pipe ring
188 * @pipe: The pipe to access
190 static inline struct pipe_buffer *pipe_head_buf(const struct pipe_inode_info *pipe)
192 return pipe_buf(pipe, pipe->head);
197 * @pipe: the pipe that the buffer belongs to
202 static inline __must_check bool pipe_buf_get(struct pipe_inode_info *pipe,
205 return buf->ops->get(pipe, buf);
210 * @pipe: the pipe that the buffer belongs to
213 static inline void pipe_buf_release(struct pipe_inode_info *pipe,
219 ops->release(pipe, buf);
223 * pipe_buf_confirm - verify contents of the pipe buffer
224 * @pipe: the pipe that the buffer belongs to
227 static inline int pipe_buf_confirm(struct pipe_inode_info *pipe,
232 return buf->ops->confirm(pipe, buf);
237 * @pipe: the pipe that the buffer belongs to
240 static inline bool pipe_buf_try_steal(struct pipe_inode_info *pipe,
245 return buf->ops->try_steal(pipe, buf);
248 static inline void pipe_discard_from(struct pipe_inode_info *pipe,
251 unsigned int mask = pipe->ring_size - 1;
253 while (pipe->head > old_head)
254 pipe_buf_release(pipe, &pipe->bufs[--pipe->head & mask]);
266 /* Wait for a pipe to be readable/writable while dropping the pipe lock */
273 /* Generic pipe buffer ops functions */
287 int pipe_resize_ring(struct pipe_inode_info *pipe, unsigned int nr_slots);