home *** CD-ROM | disk | FTP | other *** search
/ minnie.tuhs.org / unixen.tar / unixen / PDP-11 / Trees / V7 / usr / sys / h / file.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-02-03  |  596 b   |  29 lines

  1. /*
  2.  * One file structure is allocated
  3.  * for each open/creat/pipe call.
  4.  * Main use is to hold the read/write
  5.  * pointer associated with each open
  6.  * file.
  7.  */
  8. struct    file
  9. {
  10.     char    f_flag;
  11.     char    f_count;    /* reference count */
  12.     struct inode *f_inode;    /* pointer to inode structure */
  13.     union {
  14.         off_t    f_offset;    /* read/write character pointer */
  15.         struct chan *f_chan;    /* mpx channel pointer */
  16.     } f_un;
  17. };
  18.  
  19. extern struct file file[];    /* The file table itself */
  20.  
  21. /* flags */
  22. #define    FREAD    01
  23. #define    FWRITE    02
  24. #define    FPIPE    04
  25. #define FMPX    010
  26. #define    FMPY    020
  27. #define    FMP    030
  28. #define    FKERNEL    040
  29.