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;
struct user_struct * user;
}; struct mutex mutexmutex protecting the whole thing
wait_queue_head_t waitreader/writer wait point in case of empty/full pipe
unsigned int nrbufsthe number of non-empty pipe buffers in this pipe
unsigned int curbufthe current pipe buffer entry
unsigned int bufferstotal number of buffers (should be a power of 2)
unsigned int readersnumber of current readers of this pipe
unsigned int writersnumber of current writers of this pipe
unsigned int filesnumber of struct file referring this pipe (protected by ->i_lock)
unsigned int waiting_writersnumber of writers blocked waiting for room
unsigned int r_counterreader counter
unsigned int w_counterwriter counter
struct page * tmp_pagecached released page
struct fasync_struct * fasync_readersreader side fasync
struct fasync_struct * fasync_writerswriter side fasync
struct pipe_buffer * bufsthe circular array of pipe buffers
struct user_struct * userthe user who created this pipe