1: /*
   2:  * The I node is the focus of all
   3:  * file activity in unix. There is a unique
   4:  * inode allocated for each active file,
   5:  * each current directory, each mounted-on
   6:  * file, text file, and the root. An inode is 'named'
   7:  * by its dev/inumber pair. (iget/iget.c)
   8:  * Data, from mode on, is read in
   9:  * from permanent inode on volume.
  10:  */
  11: 
  12: #define NADDR   13
  13: #define NINDEX  15
  14: 
  15: struct group {
  16:     short   g_state;
  17:     char    g_index;
  18:     char    g_rot;
  19:     struct  group   *g_group;
  20:     struct  inode   *g_inode;
  21:     struct  file    *g_file;
  22:     short   g_rotmask;
  23:     short   g_datq;
  24:     struct  chan *g_chans[NINDEX];
  25: };
  26: struct  inode
  27: {
  28:     char    i_flag;
  29:     char    i_count;    /* reference count */
  30:     dev_t   i_dev;      /* device where inode resides */
  31:     ino_t   i_number;   /* i number, 1-to-1 with device address */
  32:     unsigned short  i_mode;
  33:     short   i_nlink;    /* directory entries */
  34:     short   i_uid;      /* owner */
  35:     short   i_gid;      /* group of owner */
  36:     off_t   i_size;     /* size of file */
  37:     union {
  38:         struct {
  39:             daddr_t i_addr[NADDR];  /* if normal file/directory */
  40:             daddr_t i_lastr;    /* last logical block read (for read-ahead) */
  41:         };
  42:         struct  {
  43:             daddr_t i_rdev;         /* i_addr[0] */
  44:             struct  group   i_group;    /*  multiplexor group file */
  45:         };
  46:     } i_un;
  47: };
  48: 
  49: 
  50: extern struct inode inode[];    /* The inode table itself */
  51: struct inode *mpxip;        /* mpx virtual inode */
  52: 
  53: /* flags */
  54: #define ILOCK   01      /* inode is locked */
  55: #define IUPD    02      /* file has been modified */
  56: #define IACC    04      /* inode access time to be updated */
  57: #define IMOUNT  010     /* inode is mounted on */
  58: #define IWANT   020     /* some process waiting on lock */
  59: #define ITEXT   040     /* inode is pure text prototype */
  60: #define ICHG    0100        /* inode has been changed */
  61: 
  62: /* modes */
  63: #define IFMT    0170000     /* type of file */
  64: #define     IFDIR   0040000 /* directory */
  65: #define     IFCHR   0020000 /* character special */
  66: #define     IFBLK   0060000 /* block special */
  67: #define     IFREG   0100000 /* regular */
  68: #define     IFMPC   0030000 /* multiplexed char special */
  69: #define     IFMPB   0070000 /* multiplexed block special */
  70: #define ISUID   04000       /* set user id on execution */
  71: #define ISGID   02000       /* set group id on execution */
  72: #define ISVTX   01000       /* save swapped text even after use */
  73: #define IREAD   0400        /* read, write, execute permissions */
  74: #define IWRITE  0200
  75: #define IEXEC   0100

Defined variables

mpxip defined in line 51; used 13 times

Defined struct's

group defined in line 15; used 54 times
inode defined in line 26; used 147 times

Defined macros

IACC defined in line 56; used 9 times
IEXEC defined in line 75; used 8 times
IFMPB defined in line 69; used 3 times
IFMPC defined in line 68; used 7 times
ILOCK defined in line 54; used 14 times
IMOUNT defined in line 57; used 4 times
IREAD defined in line 73; used 7 times
ISGID defined in line 71; used 3 times
ISUID defined in line 70; used 3 times
ISVTX defined in line 72; used 5 times
ITEXT defined in line 59; used 12 times
IWANT defined in line 58; used 5 times
IWRITE defined in line 74; used 11 times
NADDR defined in line 12; used 59 times
NINDEX defined in line 13; used 6 times

Usage of this include

Last modified: 1979-05-12
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 913
Valid CSS Valid XHTML 1.0 Strict