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 * wait;
   6         char * base;
   7         unsigned int start;
   8         unsigned int len;
   9         unsigned int lock;
  10         unsigned int rd_openers;
  11         unsigned int wr_openers;
  12         unsigned int readers;
  13         unsigned int writers;
  14 };
  15 
  16 #define PIPE_WAIT(inode)        ((inode).u.pipe_i.wait)
  17 #define PIPE_BASE(inode)        ((inode).u.pipe_i.base)
  18 #define PIPE_START(inode)       ((inode).u.pipe_i.start)
  19 #define PIPE_LEN(inode)         ((inode).u.pipe_i.len)
  20 #define PIPE_RD_OPENERS(inode)  ((inode).u.pipe_i.rd_openers)
  21 #define PIPE_WR_OPENERS(inode)  ((inode).u.pipe_i.wr_openers)
  22 #define PIPE_READERS(inode)     ((inode).u.pipe_i.readers)
  23 #define PIPE_WRITERS(inode)     ((inode).u.pipe_i.writers)
  24 #define PIPE_LOCK(inode)        ((inode).u.pipe_i.lock)
  25 #define PIPE_SIZE(inode)        PIPE_LEN(inode)
  26 
  27 #define PIPE_EMPTY(inode)       (PIPE_SIZE(inode)==0)
  28 #define PIPE_FULL(inode)        (PIPE_SIZE(inode)==PIPE_BUF)
  29 #define PIPE_FREE(inode)        (PIPE_BUF - PIPE_LEN(inode))
  30 #define PIPE_END(inode)         ((PIPE_START(inode)+PIPE_LEN(inode))&\
  31                                                            (PIPE_BUF-1))
  32 #define PIPE_MAX_RCHUNK(inode)  (PIPE_BUF - PIPE_START(inode))
  33 #define PIPE_MAX_WCHUNK(inode)  (PIPE_BUF - PIPE_END(inode))
  34 
  35 #endif

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