root/include/linux/pipe_fs_i.h

/* [previous][next][first][last][top][bottom][index][help] */

INCLUDED FROM


   1 #ifndef _LINUX_PIPE_FS_I_H
   2 #define _LINUX_PIPE_FS_I_H
   3 
   4 struct pipe_inode_info {
   5         struct wait_queue * read_wait;
   6         struct wait_queue * write_wait;
   7         char * base;
   8         unsigned int head;
   9         unsigned int tail;
  10         unsigned int rd_openers;
  11         unsigned int wr_openers;
  12         unsigned int readers;
  13         unsigned int writers;
  14 };
  15 
  16 #define PIPE_READ_WAIT(inode)   ((inode).u.pipe_i.read_wait)
  17 #define PIPE_WRITE_WAIT(inode)  ((inode).u.pipe_i.write_wait)
  18 #define PIPE_BASE(inode)        ((inode).u.pipe_i.base)
  19 #define PIPE_HEAD(inode)        ((inode).u.pipe_i.head)
  20 #define PIPE_TAIL(inode)        ((inode).u.pipe_i.tail)
  21 #define PIPE_RD_OPENERS(inode)  ((inode).u.pipe_i.rd_openers)
  22 #define PIPE_WR_OPENERS(inode)  ((inode).u.pipe_i.wr_openers)
  23 #define PIPE_READERS(inode)     ((inode).u.pipe_i.readers)
  24 #define PIPE_WRITERS(inode)     ((inode).u.pipe_i.writers)
  25 #define PIPE_SIZE(inode)        ((PIPE_HEAD(inode)-PIPE_TAIL(inode))&(PAGE_SIZE-1))
  26 #define PIPE_EMPTY(inode)       (PIPE_HEAD(inode)==PIPE_TAIL(inode))
  27 #define PIPE_FULL(inode)        (PIPE_SIZE(inode)==(PAGE_SIZE-1))
  28 
  29 #endif

/* [previous][next][first][last][top][bottom][index][help] */