1: #ifdef  KERNEL
   2: /*
   3:  * Random set of variables
   4:  * used by more than one
   5:  * routine.
   6:  */
   7: struct  inode   *rootdir;   /* pointer to inode of root directory */
   8: struct  proc    *runq;      /* head of linked list of running processes */
   9: struct  proc    *maxproc;   /* current high water mark in proc table */
  10: extern  cputype;        /* type of cpu = 40, 44, 45, 60, or 70 */
  11: int lbolt;          /* clock ticks since time was last updated */
  12: time_t  time;           /* time in sec from 1970 */
  13: ubadr_t clstaddr;       /* UNIBUS virtual address of clists */
  14: 
  15: /*
  16:  * Nblkdev is the number of entries
  17:  * (rows) in the block switch.
  18:  * Used in bounds checking on major
  19:  * device numbers.
  20:  */
  21: int nblkdev;
  22: 
  23: int nchrdev;        /* Number of character switch entries. */
  24: int mpid;           /* generic for unique process id's */
  25: bool_t  runin;          /* set when sched wants to swap someone in */
  26: bool_t  runout;         /* set when sched is out of work */
  27: bool_t  runrun;         /* reschedule at next opportunity */
  28: char    curpri;         /* p_pri of current process */
  29: size_t  maxmem;         /* actual max memory per process */
  30: u_short *lks;           /* pointer to clock device */
  31: extern  daddr_t swplo;      /* block number of swap space */
  32: extern  int nswap;      /* size of swap space */
  33: int updlock;        /* lock for sync */
  34: daddr_t rablock;        /* block to be read ahead */
  35: extern  char    regloc[];   /* offsets of saved user registers (trap.c) */
  36: extern  char    msgbuf[];   /* saved "printf" characters */
  37: extern  dev_t   rootdev;    /* device of the root */
  38: extern  dev_t   swapdev;    /* swapping device */
  39: extern  dev_t   pipedev;    /* pipe device */
  40: extern  int hz;     /* Ticks/second of the clock */
  41: extern  int timezone;   /* Minutes westward from Greenwich */
  42: extern  bool_t  dstflag;    /* Daylight Saving Time applies here */
  43: extern  int nmount;     /* number of mountable file systems */
  44: extern  int nfile;      /* number of in core file structures */
  45: extern  int ninode;     /* number of in core inodes */
  46: extern  int nproc;      /* maximum number of processes */
  47: extern  int ntext;      /* maximum number of shared text segments */
  48: extern  int nbuf;       /* number of buffers in buffer cache */
  49: extern  int bsize;      /* size of buffers */
  50: extern  int nclist;     /* number of character lists */
  51: 
  52: /*
  53:  *  Pointers to ends of variable-sized tables
  54:  * (point to first unused entry, e.g. proc[NPROC])
  55:  */
  56: extern  struct  mount   *mountNMOUNT;
  57: extern  struct  file    *fileNFILE;
  58: extern  struct  inode   *inodeNINODE;
  59: extern  struct  proc    *procNPROC;
  60: extern  struct  text    *textNTEXT;
  61: 
  62: #ifdef  UCB_AUTOBOOT
  63: extern  dev_t   dumpdev;    /* device for automatic dump on panic */
  64: extern  daddr_t dumplo;     /* starting block on dumpdev */
  65: #endif
  66: 
  67: extern  int icode[];    /* user init code */
  68: extern  int szicode;    /* its size */
  69: 
  70: #ifdef  CGL_RTP
  71: struct  proc    *rtpp;      /* pointer to real time process entry */
  72: int wantrtp;        /* real-time proc is ready to run */
  73: #endif
  74: time_t  bootime;
  75: 
  76: #ifdef  UCB_AUTOBOOT
  77: int bootflags;
  78: #endif
  79: 
  80: extern  bool_t  sep_id;     /* Do we have separate I/D? */
  81: 
  82: dev_t   getmdev();
  83: daddr_t bmap();
  84: memaddr malloc();
  85: struct  inode   *ialloc();
  86: struct  inode   *iget();
  87: struct  inode   *owner();
  88: struct  inode   *maknode();
  89: struct  inode   *namei();
  90: struct  buf *alloc();
  91: struct  buf *getblk();
  92: struct  buf *geteblk();
  93: struct  buf *bread();
  94: struct  buf *breada();
  95: struct  filsys  *getfs();
  96: struct  file    *getf();
  97: struct  file    *falloc();
  98: int uchar();
  99: 
 100: caddr_t mapin();
 101: 
 102: #ifdef  NOKA5
 103: #define mapout(bp)  /* unused */
 104: #endif
 105: 
 106: /*
 107:  * Instrumentation
 108:  */
 109: 
 110: int dk_busy;
 111:     /*
 112: 	 * sy_time contains counters for time in user (0,1), nice (2,3),
 113: 	 * system (4,5) and idle (6,7) with no I/O active (even)
 114: 	 * or some disc active (odd).
 115: 	 */
 116: long    sy_time[8];
 117: extern  int ndisk;          /* number of disks monitored */
 118: extern  long    dk_time[];
 119: extern  long    dk_numb[];
 120: extern  long    dk_wds[];
 121: 
 122: long    tk_nin;
 123: long    tk_nout;
 124: 
 125: #endif	KERNEL
 126: 
 127: #ifdef  DISKMON
 128: struct  ioinfo  {
 129:     long    nread;
 130:     long    nreada;
 131:     long    ncache;
 132:     long    nwrite;
 133: };
 134: #endif
 135: 
 136: /*
 137:  * Structure of the system-entry table
 138:  */
 139: struct  sysent  {           /* system call entry table */
 140:     char    sy_narg;        /* total number of arguments */
 141:     char    sy_nrarg;       /* number of args in registers */
 142:     int (*sy_call)();       /* handler */
 143: };
 144: 
 145: #ifdef  KERNEL
 146: extern  struct  sysent  sysent[];   /* local system call entry table */
 147: extern  struct  sysent  syslocal[]; /* local system call entry table */
 148: extern  int nlocalsys;      /* number of local syscalls in table */
 149: #endif	KERNEL
 150: 
 151: #define SYSINDIR    0       /* ordinal of indirect sys call */
 152: #define SYSLOCAL    58      /* ordinal of local indirect call */
 153: 
 154: /*
 155:  * Structure of the disk driver partition tables
 156:  */
 157: struct  size    {
 158:     daddr_t nblocks;
 159:     short   cyloff;
 160: };
 161: 
 162: /* operations performed by namei */
 163: #define LOOKUP      0   /* perform name lookup only */
 164: #define CREATE      1   /* setup for file creation */
 165: #define DELETE      2   /* setup for file deletion */

Defined variables

bootflags defined in line 77; used 2 times
curpri defined in line 28; used 5 times
mpid defined in line 24; used 6 times
nchrdev defined in line 23; used 1 times
rootdir defined in line 7; used 4 times
rtpp defined in line 71; used 9 times
runq defined in line 8; used 9 times
sy_time defined in line 116; used 25 times
tk_nin defined in line 122; used 2 times
tk_nout defined in line 123; used 8 times
updlock defined in line 33; used 3 times
wantrtp defined in line 72; used 2 times

Defined struct's

ioinfo defined in line 128; used 4 times
size defined in line 157; used 44 times
sysent defined in line 139; used 10 times

Defined macros

CREATE defined in line 164; used 11 times
DELETE defined in line 165; used 3 times
SYSINDIR defined in line 151; used 1 times
SYSLOCAL defined in line 152; used 1 times

Usage of this include

systm.h used 70 times
Last modified: 1983-03-14
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 1100
Valid CSS Valid XHTML 1.0 Strict