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

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