Lines Matching full: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.
62 * struct pipe_inode_info - a linux kernel pipe
64 * @rd_wait: reader wait point in case of empty pipe
65 * @wr_wait: writer wait point in case of full pipe
72 * @nr_accounted: The amount this pipe accounts for in user->pipe_bufs
74 * @readers: number of current readers of this pipe
75 * @writers: number of current writers of this pipe
76 * @files: number of struct file referring this pipe (protected by ->i_lock)
79 * @poll_usage: is this pipe used for epoll, which has crazy wakeups?
82 * @bufs: the circular array of pipe buffers
83 * @user: the user who created this pipe
84 * @watch_queue: If this pipe is a watch_queue, this is the stuff for that
128 * the meaning of each operation. Also see the kerneldoc in fs/pipe.c for the
129 * pipe and generic variants of these hooks.
133 * ->confirm() verifies that the data in the pipe buffer is there
134 * and that the contents are good. If the pages in the pipe belong
142 * When the contents of this pipe buffer has been completely
148 * Attempt to take ownership of the pipe buffer and its contents.
150 * of the pipe (the buf->page) is locked and now completely owned by the
158 * Get a reference to the pipe buffer.
164 * pipe_has_watch_queue - Check whether the pipe is a watch_queue,
166 * @pipe: The pipe to check
168 * Return: true if pipe is a watch queue, false otherwise.
170 static inline bool pipe_has_watch_queue(const struct pipe_inode_info *pipe) in pipe_has_watch_queue() argument
173 return pipe->watch_queue != NULL; in pipe_has_watch_queue()
180 * pipe_occupancy - Return number of slots used in the pipe
181 * @head: The pipe ring head pointer
182 * @tail: The pipe ring tail pointer
190 * pipe_empty - Return true if the pipe is empty
191 * @head: The pipe ring head pointer
192 * @tail: The pipe ring tail pointer
200 * pipe_full - Return true if the pipe is full
201 * @head: The pipe ring head pointer
202 * @tail: The pipe ring tail pointer
212 * pipe_is_full - Return true if the pipe is full
213 * @pipe: the pipe
215 static inline bool pipe_is_full(const struct pipe_inode_info *pipe) in pipe_is_full() argument
217 return pipe_full(pipe->head, pipe->tail, pipe->max_usage); in pipe_is_full()
221 * pipe_is_empty - Return true if the pipe is empty
222 * @pipe: the pipe
224 static inline bool pipe_is_empty(const struct pipe_inode_info *pipe) in pipe_is_empty() argument
226 return pipe_empty(pipe->head, pipe->tail); in pipe_is_empty()
230 * pipe_buf_usage - Return how many pipe buffers are in use
231 * @pipe: the pipe
233 static inline unsigned int pipe_buf_usage(const struct pipe_inode_info *pipe) in pipe_buf_usage() argument
235 return pipe_occupancy(pipe->head, pipe->tail); in pipe_buf_usage()
239 * pipe_buf - Return the pipe buffer for the specified slot in the pipe ring
240 * @pipe: The pipe to access
243 static inline struct pipe_buffer *pipe_buf(const struct pipe_inode_info *pipe, in pipe_buf() argument
246 return &pipe->bufs[slot & (pipe->ring_size - 1)]; in pipe_buf()
250 * pipe_head_buf - Return the pipe buffer at the head of the pipe ring
251 * @pipe: The pipe to access
253 static inline struct pipe_buffer *pipe_head_buf(const struct pipe_inode_info *pipe) in pipe_head_buf() argument
255 return pipe_buf(pipe, pipe->head); in pipe_head_buf()
260 * @pipe: the pipe that the buffer belongs to
265 static inline __must_check bool pipe_buf_get(struct pipe_inode_info *pipe, in pipe_buf_get() argument
268 return buf->ops->get(pipe, buf); in pipe_buf_get()
273 * @pipe: the pipe that the buffer belongs to
276 static inline void pipe_buf_release(struct pipe_inode_info *pipe, in pipe_buf_release() argument
282 ops->release(pipe, buf); in pipe_buf_release()
286 * pipe_buf_confirm - verify contents of the pipe buffer
287 * @pipe: the pipe that the buffer belongs to
290 static inline int pipe_buf_confirm(struct pipe_inode_info *pipe, in pipe_buf_confirm() argument
295 return buf->ops->confirm(pipe, buf); in pipe_buf_confirm()
300 * @pipe: the pipe that the buffer belongs to
303 static inline bool pipe_buf_try_steal(struct pipe_inode_info *pipe, in pipe_buf_try_steal() argument
308 return buf->ops->try_steal(pipe, buf); in pipe_buf_try_steal()
315 /* Pipe lock and unlock operations */
320 /* Wait for a pipe to be readable/writable while dropping the pipe lock */
327 /* Generic pipe buffer ops functions */
341 int pipe_resize_ring(struct pipe_inode_info *pipe, unsigned int nr_slots);