home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume3 / sps / part1 / globals2.c < prev    next >
Encoding:
C/C++ Source or Header  |  1986-11-30  |  5.1 KB  |  101 lines

  1. # include       "sps.h"
  2.  
  3. /* Read Only variables, global to the code of sps ... */
  4.  
  5. /* Null ttyline device ... */
  6. struct ttyline                  Notty = { 0, 0, "  ", 0 } ;
  7.  
  8. /*
  9. ** The symbol table. For each address read from the kernel during
  10. ** initialisation, this table shows the following:
  11. **      i.   the name of that symbol within the kernel ;
  12. **      ii.  whether an extra indirection is needed through the kernel,
  13. **           i.e. whether the value of that symbol should be obtained
  14. **           rather than its address.
  15. **      iii. where the obtained value/address is placed in the Info structure ;
  16. **      iv.  whether the obtained value is associated with a reason for
  17. **           a process wait state.
  18. */
  19. /* The order of entries in this table is unimportant. */
  20.  
  21. extern struct info              Info ;
  22.  
  23. struct symbol   Symbollist[] =
  24. {       
  25.     /* Kernel addresses required in order to access process,
  26.        tty and upage information. All these addresses should be
  27.        located in the symbol file during initialisation. */
  28.     { "_proc",      1,  (caddr_t*)&Info.i_proc0,    (char*)0        },
  29.     { "_nproc",     1,  (caddr_t*)&Info.i_nproc,    (char*)0        },
  30.     { "_text",      1,  (caddr_t*)&Info.i_text0,    (char*)0        },
  31.     { "_ntext",     1,  (caddr_t*)&Info.i_ntext,    (char*)0        },
  32.     { "_inode",     1,  (caddr_t*)&Info.i_inode0,   (char*)0        },
  33.     { "_ninode",    1,  (caddr_t*)&Info.i_ninode,   (char*)0        },
  34.     { "_swbuf",     1,  (caddr_t*)&Info.i_swbuf0,   (char*)0        },
  35.     { "_nswbuf",    1,  (caddr_t*)&Info.i_nswbuf,   (char*)0        },
  36.     { "_buf",       1,  (caddr_t*)&Info.i_buf0,     (char*)0        },
  37.     { "_nbuf",      1,  (caddr_t*)&Info.i_nbuf,     (char*)0        },
  38.     { "_ecmx",      1,  (caddr_t*)&Info.i_ecmx,     (char*)0        },
  39.     { "_Usrptmap",  0,  (caddr_t*)&Info.i_usrptmap, (char*)0        },
  40.     { "_usrpt",     0,  (caddr_t*)&Info.i_usrpt,    (char*)0        },
  41.     { "_cdevsw",    0,  (caddr_t*)&Info.i_cdevsw,   (char*)0        },
  42. # ifdef BSD42
  43.     { "_quota",     1,  (caddr_t*)&Info.i_quota0,   (char*)0        },
  44.     { "_nquota",    1,  (caddr_t*)&Info.i_nquota,   (char*)0        },
  45.     { "_dmmin",     1,  (caddr_t*)&Info.i_dmmin,    (char*)0        },
  46.     { "_dmmax",     1,  (caddr_t*)&Info.i_dmmax,    (char*)0        },
  47.     { "_mbutl",     0,  (caddr_t*)&Info.i_mbutl,    (char*)0        },
  48. # else
  49.     { "_hz",        1,  (caddr_t*)&Info.i_hz,       (char*)0        },
  50. # endif
  51. # ifdef CHAOS
  52.     { "_Chconntab", 0,  &Info.i_Chconntab,          (char*)0        },
  53. # endif
  54.     /* Kernel addresses associated with process wait states.
  55.        It is not important if some of these addresses are unresolved
  56.        at initialisation. */
  57.     { "_fltab",     0,  &Info.i_waitstate[0],       "floppy"        },
  58.     { "_tu",        0,  &Info.i_waitstate[1],       "tu58"          },
  59.     { "_bfreelist", 0,  &Info.i_waitstate[2],       "buffer"        },
  60.     { "_lp_softc",  0,  &Info.i_waitstate[3],       "printr"        },
  61.     { "_lbolt",     0,  &Info.i_waitstate[4],       "lbolt"         },
  62.     { "_runin",     0,  &Info.i_waitstate[5],       "runin"         },
  63.     { "_runout",    0,  &Info.i_waitstate[6],       "runout"        },
  64.     { "_ipc",       0,  &Info.i_waitstate[7],       "ptrace"        },
  65.     { "_u",         0,  &Info.i_waitstate[8],       "pause"         },
  66.     { "_freemem",   0,  &Info.i_waitstate[9],       "freemm"        },
  67.     { "_kernelmap", 0,  &Info.i_waitstate[10],      "kermap"        },
  68.     { "_cwaiting",  0,  &Info.i_waitstate[11],      "cwait"         },
  69.     { "_rhpbuf",    0,  &Info.i_waitstate[12],      "rhpbuf"        },
  70.     { "_rhtbuf",    0,  &Info.i_waitstate[13],      "rhtbuf"        },
  71.     { "_ridcbuf",   0,  &Info.i_waitstate[14],      "ridcbf"        },
  72.     { "_rikbuf",    0,  &Info.i_waitstate[15],      "rikbuf"        },
  73.     { "_rmtbuf",    0,  &Info.i_waitstate[16],      "rmtbuf"        },
  74.     { "_rrkbuf",    0,  &Info.i_waitstate[17],      "rrkbuf"        },
  75.     { "_rrlbuf",    0,  &Info.i_waitstate[18],      "rrlbuf"        },
  76.     { "_rrxbuf",    0,  &Info.i_waitstate[19],      "rrxbuf"        },
  77.     { "_rswbuf",    0,  &Info.i_waitstate[20],      "rswbuf"        },
  78.     { "_rtmbuf",    0,  &Info.i_waitstate[21],      "rtmbuf"        },
  79.     { "_rtsbuf",    0,  &Info.i_waitstate[22],      "rtsbuf"        },
  80.     { "_rudbuf",    0,  &Info.i_waitstate[23],      "rudbuf"        },
  81.     { "_rupbuf",    0,  &Info.i_waitstate[24],      "rupbuf"        },
  82.     { "_rutbuf",    0,  &Info.i_waitstate[25],      "rutbuf"        },
  83.     { "_rvabuf",    0,  &Info.i_waitstate[26],      "rvabuf"        },
  84.     { "_rvpbuf",    0,  &Info.i_waitstate[27],      "rvpbuf"        },
  85.     { "_chtbuf",    0,  &Info.i_waitstate[28],      "chtbuf"        },
  86.     { "_cmtbuf",    0,  &Info.i_waitstate[29],      "cmtbuf"        },
  87.     { "_ctmbuf",    0,  &Info.i_waitstate[30],      "ctmbuf"        },
  88.     { "_ctsbuf",    0,  &Info.i_waitstate[31],      "ctsbuf"        },
  89.     { "_cutbuf",    0,  &Info.i_waitstate[32],      "cutbuf"        },
  90. # ifdef BSD42
  91.     { "_selwait",   0,  &Info.i_waitstate[33],      "select"        },
  92. # endif
  93. # ifdef CHAOS
  94.     { "_Chrfclist", 0,  &Info.i_waitstate[34],      "chrfc"         },
  95. # endif
  96. # ifdef SUN
  97.     { "_async_bufhead", 0,  &Info.i_waitstate[35],  "async"        },
  98. # endif
  99.     { (char*)0,     0,  (caddr_t*)0,                (char*)0        }
  100. } ;
  101.