Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
pipe_fs_i.h File Reference

Go to the source code of this file.

Data Structures

struct  pipe_buffer
 
struct  pipe_inode_info
 
struct  pipe_buf_operations
 

Macros

#define PIPE_DEF_BUFFERS   16
 
#define PIPE_BUF_FLAG_LRU   0x01 /* page is on the LRU */
 
#define PIPE_BUF_FLAG_ATOMIC   0x02 /* was atomically mapped */
 
#define PIPE_BUF_FLAG_GIFT   0x04 /* page is a gift */
 
#define PIPE_BUF_FLAG_PACKET   0x08 /* read() as a packet */
 
#define PIPE_SIZE   PAGE_SIZE
 

Functions

void pipe_lock (struct pipe_inode_info *)
 
void pipe_unlock (struct pipe_inode_info *)
 
void pipe_double_lock (struct pipe_inode_info *, struct pipe_inode_info *)
 
int pipe_proc_fn (struct ctl_table *, int, void __user *, size_t *, loff_t *)
 
void pipe_wait (struct pipe_inode_info *pipe)
 
struct pipe_inode_infoalloc_pipe_info (struct inode *inode)
 
void free_pipe_info (struct inode *inode)
 
void __free_pipe_info (struct pipe_inode_info *)
 
voidgeneric_pipe_buf_map (struct pipe_inode_info *, struct pipe_buffer *, int)
 
void generic_pipe_buf_unmap (struct pipe_inode_info *, struct pipe_buffer *, void *)
 
void generic_pipe_buf_get (struct pipe_inode_info *, struct pipe_buffer *)
 
int generic_pipe_buf_confirm (struct pipe_inode_info *, struct pipe_buffer *)
 
int generic_pipe_buf_steal (struct pipe_inode_info *, struct pipe_buffer *)
 
void generic_pipe_buf_release (struct pipe_inode_info *, struct pipe_buffer *)
 
long pipe_fcntl (struct file *, unsigned int, unsigned long arg)
 
struct pipe_inode_infoget_pipe_info (struct file *file)
 
int create_pipe_files (struct file **, int)
 

Variables

unsigned int pipe_max_size
 
unsigned int pipe_min_size
 

Macro Definition Documentation

#define PIPE_BUF_FLAG_ATOMIC   0x02 /* was atomically mapped */

Definition at line 7 of file pipe_fs_i.h.

#define PIPE_BUF_FLAG_GIFT   0x04 /* page is a gift */

Definition at line 8 of file pipe_fs_i.h.

#define PIPE_BUF_FLAG_LRU   0x01 /* page is on the LRU */

Definition at line 6 of file pipe_fs_i.h.

#define PIPE_BUF_FLAG_PACKET   0x08 /* read() as a packet */

Definition at line 9 of file pipe_fs_i.h.

#define PIPE_DEF_BUFFERS   16

Definition at line 4 of file pipe_fs_i.h.

#define PIPE_SIZE   PAGE_SIZE

Definition at line 133 of file pipe_fs_i.h.

Function Documentation

void __free_pipe_info ( struct pipe_inode_info )

Definition at line 944 of file pipe.c.

struct pipe_inode_info* alloc_pipe_info ( struct inode inode)
read

Definition at line 924 of file pipe.c.

int create_pipe_files ( struct file **  ,
int   
)

Definition at line 1019 of file pipe.c.

void free_pipe_info ( struct inode inode)

Definition at line 959 of file pipe.c.

int generic_pipe_buf_confirm ( struct pipe_inode_info info,
struct pipe_buffer buf 
)

generic_pipe_buf_confirm - verify contents of the pipe buffer : the pipe that the buffer belongs to : the buffer to confirm

Description: This function does nothing, because the generic pipe code uses pages that are always good when inserted into the pipe.

Definition at line 317 of file pipe.c.

void generic_pipe_buf_get ( struct pipe_inode_info pipe,
struct pipe_buffer buf 
)

generic_pipe_buf_get - get a reference to a &struct pipe_buffer : the pipe that the buffer belongs to : the buffer to get a reference to

Description: This function grabs an extra reference to . It's used in in the tee() system call, when we duplicate the buffers in one pipe into another.

Definition at line 302 of file pipe.c.

void* generic_pipe_buf_map ( struct pipe_inode_info pipe,
struct pipe_buffer buf,
int  atomic 
)

generic_pipe_buf_map - virtually map a pipe buffer : the pipe that the buffer belongs to : the buffer that should be mapped : whether to use an atomic map

Description: This function returns a kernel virtual address mapping for the pipe_buffer passed in . If is set, an atomic map is provided and the caller has to be careful not to fault before calling the unmap function.

Note that this function calls kmap_atomic() if != 0.

Definition at line 229 of file pipe.c.

void generic_pipe_buf_release ( struct pipe_inode_info pipe,
struct pipe_buffer buf 
)

generic_pipe_buf_release - put a reference to a &struct pipe_buffer : the pipe that the buffer belongs to : the buffer to put a reference to

Description: This function releases a reference to .

Definition at line 332 of file pipe.c.

int generic_pipe_buf_steal ( struct pipe_inode_info pipe,
struct pipe_buffer buf 
)

generic_pipe_buf_steal - attempt to take ownership of a &pipe_buffer : the pipe that the buffer belongs to : the buffer to attempt to steal

Description: This function attempts to steal the &struct page attached to . If successful, this function returns 0 and returns with the page locked. The caller may then reuse the page for whatever he wishes; the typical use is insertion into a different file page cache.

Definition at line 273 of file pipe.c.

void generic_pipe_buf_unmap ( struct pipe_inode_info pipe,
struct pipe_buffer buf,
void map_data 
)

generic_pipe_buf_unmap - unmap a previously mapped pipe buffer : the pipe that the buffer belongs to : the buffer that should be unmapped : the data that the mapping function returned

Description: This function undoes the mapping that ->map() provided.

Definition at line 250 of file pipe.c.

struct pipe_inode_info* get_pipe_info ( struct file file)
read

Definition at line 1227 of file pipe.c.

void pipe_double_lock ( struct pipe_inode_info ,
struct pipe_inode_info  
)

Definition at line 76 of file pipe.c.

long pipe_fcntl ( struct file ,
unsigned  int,
unsigned long  arg 
)

Definition at line 1234 of file pipe.c.

void pipe_lock ( struct pipe_inode_info )

Definition at line 60 of file pipe.c.

int pipe_proc_fn ( struct ctl_table ,
int  ,
void __user ,
size_t ,
loff_t *   
)

Definition at line 1209 of file pipe.c.

void pipe_unlock ( struct pipe_inode_info )

Definition at line 69 of file pipe.c.

void pipe_wait ( struct pipe_inode_info pipe)

Definition at line 91 of file pipe.c.

Variable Documentation

unsigned int pipe_max_size

Definition at line 32 of file pipe.c.

unsigned int pipe_min_size

Definition at line 37 of file pipe.c.