struct pipe_inode_info — a linux kernel pipe
struct pipe_inode_info { struct mutex mutex; wait_queue_head_t wait; unsigned int nrbufs; unsigned int curbuf; unsigned int buffers; unsigned int readers; unsigned int writers; unsigned int files; unsigned int waiting_writers; unsigned int r_counter; unsigned int w_counter; struct page * tmp_page; struct fasync_struct * fasync_readers; struct fasync_struct * fasync_writers; struct pipe_buffer * bufs; };
mutex protecting the whole thing
reader/writer wait point in case of empty/full pipe
the number of non-empty pipe buffers in this pipe
the current pipe buffer entry
total number of buffers (should be a power of 2)
number of current readers of this pipe
number of current writers of this pipe
number of struct file referring this pipe (protected by ->i_lock)
number of writers blocked waiting for room
reader counter
writer counter
cached released page
reader side fasync
writer side fasync
the circular array of pipe buffers