home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: SysTools / SysTools.zip / sysba021.zip / SRC.ZIP / sysbar2 / Piper / cpuload / dosqss.h < prev    next >
C/C++ Source or Header  |  1997-03-17  |  3KB  |  165 lines

  1. #ifndef DOSQSS_H
  2. #define DOSQSS_H
  3.  
  4. #ifdef __cplusplus
  5. extern "C" {
  6. #endif
  7. APIRET APIENTRY DosQuerySysState(ULONG func,ULONG arg1,ULONG arg2,
  8.             ULONG _res_,PVOID buf,ULONG bufsz);
  9. #ifdef __cplusplus
  10. }
  11. #endif
  12.  
  13. typedef struct {
  14.     ULONG        threadcnt;
  15.     ULONG        proccnt;
  16.     ULONG        modulecnt;
  17. } QGLOBAL, *PQGLOBAL;
  18.  
  19. typedef struct {
  20.     ULONG        rectype;
  21.     USHORT        threadid;
  22.     USHORT        slotid;
  23.     ULONG        sleepid;
  24.     ULONG        priority;
  25.     ULONG        systime;
  26.     ULONG        usertime;
  27.     UCHAR        state;
  28.     UCHAR        _reserved1_;    /* padding to ULONG */
  29.     USHORT        _reserved2_;    /* padding to ULONG */
  30. } QTHREAD, *PQTHREAD;
  31.  
  32. typedef struct {
  33.     USHORT        sfn;
  34.     USHORT        refcnt;
  35.     USHORT        flags1;
  36.     USHORT        flags2;
  37.     USHORT        accmode1;
  38.     USHORT        accmode2;
  39.     ULONG        filesize;
  40.     USHORT      volhnd;
  41.     USHORT        attrib;
  42.     USHORT        _reserved_;
  43. } QFDS, *PQFDS;
  44.  
  45. typedef struct qfile {
  46.     ULONG        rectype;
  47.     struct qfile    *next;
  48.     ULONG        opencnt;
  49.     PQFDS        filedata;
  50.     char        name[1];
  51. } QFILE, *PQFILE;
  52.  
  53. typedef struct {
  54.     ULONG        rectype;
  55.     PQTHREAD    threads;
  56.     USHORT        pid;
  57.     USHORT        ppid;
  58.     ULONG        type;
  59.     ULONG        state;
  60.     ULONG        sessid;
  61.     USHORT        hndmod;
  62.     USHORT        threadcnt;
  63.     ULONG        privsem32cnt;
  64.     ULONG        _reserved2_;
  65.     USHORT        sem16cnt;
  66.     USHORT        dllcnt;
  67.     USHORT        shrmemcnt;
  68.     USHORT        fdscnt;
  69.     PUSHORT        sem16s;
  70.     PUSHORT        dlls;
  71.     PUSHORT        shrmems;
  72.     PUSHORT        fds;
  73. } QPROCESS, *PQPROCESS;
  74.  
  75. typedef struct sema {
  76.     struct sema     *next;
  77.     USHORT        refcnt;
  78.     UCHAR        sysflags;
  79.     UCHAR        sysproccnt;
  80.     ULONG        _reserved1_;
  81.     USHORT        index;
  82.     CHAR        name[1];
  83. } QSEMA, *PQSEMA;
  84.  
  85. typedef struct {
  86.     ULONG        rectype;
  87.     ULONG        _reserved1_;
  88.     USHORT        _reserved2_;
  89.     USHORT        syssemidx;
  90.     ULONG        index;
  91.     QSEMA        sema;
  92. } QSEMSTRUC, *PQSEMSTRUC;
  93.  
  94. typedef struct {
  95.     USHORT        pid;
  96.     USHORT        opencnt;
  97. } QSEMOWNER32, *PQSEMOWNER32;
  98.  
  99. typedef struct {
  100.     PQSEMOWNER32  own;
  101.     PCHAR        name;
  102.     PVOID        semrecs; /* array of associated sema's */
  103.     USHORT        flags;
  104.     USHORT        semreccnt;
  105.     USHORT        waitcnt;
  106.     USHORT        _reserved_;    /* padding to ULONG */
  107. } QSEMSMUX32, *PQSEMSMUX32;
  108.  
  109. typedef struct {
  110.     PQSEMOWNER32    own;
  111.     PCHAR        name;
  112.     PQSEMSMUX32    mux;
  113.     USHORT        flags;
  114.     USHORT        postcnt;
  115. } QSEMEV32, *PQSEMEV32;
  116.  
  117. typedef struct {
  118.     PQSEMOWNER32    own;
  119.     PCHAR        name;
  120.     PQSEMSMUX32 mux;
  121.     USHORT        flags;
  122.     USHORT        refcnt;
  123.     USHORT        thrdnum;
  124.     USHORT        _reserved_;    /* padding to ULONG */
  125. } QSEMMUX32, *PQSEMMUX32;
  126.  
  127. typedef struct semstr32 {
  128.     struct semstr32   *next;
  129.     QSEMEV32    evsem;
  130.     QSEMMUX32    muxsem;
  131.     QSEMSMUX32    smuxsem;
  132. } QSEMSTRUC32, *PQSEM32STRUC;
  133.  
  134. typedef struct shrmem {
  135.     struct shrmem    *next;
  136.     USHORT        hndshr;
  137.     USHORT        selshr;
  138.     USHORT        refcnt;
  139.     CHAR        name[1];
  140. } QSHRMEM, *PQSHRMEM;
  141.  
  142. typedef struct module {
  143.     struct module    *next;
  144.     USHORT        hndmod;
  145.     USHORT        type;
  146.     ULONG        refcnt;
  147.     ULONG        segcnt;
  148.     PVOID        _reserved_;
  149.     PCHAR        name;
  150.     USHORT        modref[1];
  151. } QMODULE, *PQMODULE;
  152.  
  153. typedef struct {
  154.     PQGLOBAL    gbldata;
  155.     PQPROCESS    procdata;
  156.     PQSEMSTRUC    semadata;
  157.     PQSEM32STRUC    sem32data;
  158.     PQSHRMEM    shrmemdata;
  159.     PQMODULE    moddata;
  160.     PVOID        _reserved2_;
  161.     PQFILE        filedata;
  162. } QTOPLEVEL, *PQTOPLEVEL;
  163.  
  164. #endif
  165.