home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: SysTools / SysTools.zip / taman002.zip / TASKMANA.ZIP / src / kQuerySysState.h < prev    next >
C/C++ Source or Header  |  2000-04-29  |  25KB  |  519 lines

  1. /* $Id: kQuerySysState.h,v 1.1 2000/04/29 19:06:35 stknut Exp $
  2.  *
  3.  * Textmode prototype made for testing purposes of the OS/2 taskmgr.
  4.  *
  5.  * Copyright (c) 2000 knut st. osmundsen (knut.stange.osmundsen@pmsc.no)
  6.  *
  7.  * (GPL licensed)
  8.  *
  9.  */
  10.  
  11. #if !defined(_kQuerySysState_h_)
  12.  
  13. #ifdef __cplusplus
  14. extern "C" {
  15. #endif
  16.  
  17. #if !defined(QS_PROCESS)
  18. /*******************************************************************************
  19. *   From the OS/2 4.5 toolkit.                                                 *
  20. *******************************************************************************/
  21.  
  22. /* defines and structures for DosQuerySysState */
  23. #pragma pack(1)
  24. /* record types */
  25. #define QS_PROCESS      0x0001
  26. #define QS_SEMAPHORE    0x0002
  27. #define QS_MTE          0x0004
  28. #define QS_FILESYS      0x0008
  29. #define QS_SHMEMORY     0x0010
  30. #define QS_DISK         0x0020
  31. #define QS_HWCONFIG     0x0040
  32. #define QS_NAMEDPIPE    0x0080
  33. #define QS_THREAD       0x0100
  34. #define QS_MODVER       0x0200
  35.  
  36. /* valid EntityList bit settings */
  37. #define QS_SUPPORTED    (QS_PROCESS|QS_SEMAPHORE|QS_MTE|QS_FILESYS|QS_SHMEMORY|QS_MODVER)
  38.  
  39. /* All structures must be padded to dword boundaries if necessary  */
  40. /* The semicolon that is needed to terminate the structure field   */
  41. /* must be added in the structure definition itself, because H2INC */
  42. /* ignores it in a #define statement. */
  43. #define PADSHORT        USHORT        pad_sh
  44. #define PADCHAR         UCHAR         pad_ch
  45.  
  46. #define QS_END          0L       /* last FILESYS record */
  47.  
  48. /* Global Record structure
  49.  * Holds all global system information. Placed first in user buffer
  50.  */
  51. typedef struct qsGrec_s {  /* qsGrec */
  52.         ULONG         cThrds;
  53.         ULONG         c32SSem;
  54.         ULONG         cMFTNodes;
  55. } qsGrec_t;
  56.  
  57. /* Thread Record structure
  58.  *      Holds all per thread information.
  59.  */
  60. typedef struct qsTrec_s {  /* qsTrec */
  61.         ULONG         RecType;        /* Record Type */
  62.         USHORT        tid;            /* thread ID */
  63.         USHORT        slot;           /* "unique" thread slot number */
  64.         ULONG         sleepid;        /* sleep id thread is sleeping on */
  65.         ULONG         priority;       /* thread priority */
  66.         ULONG         systime;        /* thread system time */
  67.         ULONG         usertime;       /* thread user time */
  68.         UCHAR         state;          /* thread state */
  69.         PADCHAR;
  70.         PADSHORT;
  71. } qsTrec_t;
  72.  
  73. /* Process Record structure
  74.  *      Holds all per process information.
  75.  *      ________________________________
  76.  *      |       RecType                 |
  77.  *      |-------------------------------|
  78.  *      |       pThrdRec                |----|
  79.  *      |-------------------------------|    |
  80.  *      |       pid                     |    |
  81.  *      |-------------------------------|    |
  82.  *      |       ppid                    |    |
  83.  *      |-------------------------------|    |
  84.  *      |       type                    |    |
  85.  *      |-------------------------------|    |
  86.  *      |       stat                    |    |
  87.  *      |-------------------------------|    |
  88.  *      |       sgid                    |    |
  89.  *      |-------------------------------|    |
  90.  *      |       hMte                    |    |
  91.  *      |-------------------------------|    |
  92.  *      |       cTCB                    |    |
  93.  *      |-------------------------------|    |
  94.  *      |       c32PSem                 |    |
  95.  *      |-------------------------------|    |
  96.  *      |       p32SemRec               |----|---|
  97.  *      |-------------------------------|    |   |
  98.  *      |       c16Sem                  |    |   |
  99.  *      |-------------------------------|    |   |
  100.  *      |       cLib                    |    |   |
  101.  *      |-------------------------------|    |   |
  102.  *      |       cShrMem                 |    |   |
  103.  *      |-------------------------------|    |   |
  104.  *      |       cFS                     |    |   |
  105.  *      |-------------------------------|    |   |
  106.  *      |       p16SemRec               |----|---|----|
  107.  *      |-------------------------------|    |   |    |
  108.  *      |       pLibRec                 |----|---|----|------|
  109.  *      |-------------------------------|    |   |    |      |
  110.  *      |       pShrMemRec              |----|---|----|------|----|
  111.  *      |-------------------------------|    |   |    |      |    |
  112.  *      |       pFSRec                  |----|---|----|------|----|-----|
  113.  *      |-------------------------------|    |   |    |      |    |     |
  114.  *      |       32SemPPRUN[0]           |<---|---|    |      |    |     |
  115.  *      |          .                    |    |        |      |    |     |
  116.  *      |          .                    |    |        |      |    |     |
  117.  *      |          .                    |    |        |      |    |     |
  118.  *      |       32SemPPRUN[c32PSem-1]   |    |        |      |    |     |
  119.  *      |-------------------------------|    |        |      |    |     |
  120.  *      |       16SemIndx[0]            |<---|--------|      |    |     |
  121.  *      |          .                    |    |               |    |     |
  122.  *      |          .                    |    |               |    |     |
  123.  *      |          .                    |    |               |    |     |
  124.  *      |       16SemIndx[c16Sem-1]     |    |               |    |     |
  125.  *      |-------------------------------|    |               |    |     |
  126.  *      |       hmte[0] (or "name str") |<---|---------------|    |     |
  127.  *      |          .                    |    |                    |     |
  128.  *      |          .                    |    |                    |     |
  129.  *      |          .                    |    |                    |     |
  130.  *      |       hmte[cLib-1]            |    |                    |     |
  131.  *      |-------------------------------|    |                    |     |
  132.  *      |       hshmem[0]               |<---|--------------------|     |
  133.  *      |          .                    |    |                          |
  134.  *      |          .                    |    |                          |
  135.  *      |          .                    |    |                          |
  136.  *      |       hshmem[cShrMem-1]       |    |                          |
  137.  *      |-------------------------------|    |                          |
  138.  *      |       fsinfo[0]               |<---|--------------------------|
  139.  *      |          .                    |    |
  140.  *      |          .                    |    |
  141.  *      |          .                    |    |
  142.  *      |       fsinfo[cFS-1]           |    |
  143.  *      |-------------------------------|    |
  144.  *                                      <-----
  145.  *      NOTE that the process name string will be stored in place of hmtes
  146.  *              if MTE information is NOT being requested.
  147.  *      NOTE that following this structure in the user buffer is
  148.  *              an array c32Sems long of PRUN structures for 32 bit sems
  149.  *              an array c16Sems long of indices for 16 bit sems
  150.  *              the process name string
  151.  */
  152. typedef struct qsPrec_s {  /* qsPrec */
  153.         ULONG         RecType;        /* type of record being processed */
  154.         qsTrec_t  FAR *pThrdRec;      /* ptr to thread recs for this proc */
  155.         USHORT        pid;            /* process ID */
  156.         USHORT        ppid;           /* parent process ID */
  157.         ULONG         type;           /* process type */
  158.         ULONG         stat;           /* process status */
  159.         ULONG         sgid;           /* process screen group */
  160.         USHORT        hMte;           /* program module handle for process */
  161.         USHORT        cTCB;           /* # of TCBs in use */
  162.         ULONG         c32PSem;        /* # of private 32-bit sems in use */
  163.         void      FAR *p32SemRec;     /* pointer to head of 32bit sem info */
  164.         USHORT        c16Sem;         /* # of 16 bit system sems in use */
  165.         USHORT        cLib;           /* number of runtime linked libraries */
  166.         USHORT        cShrMem;        /* number of shared memory handles */
  167.         USHORT        cFH;            /* number of open files - BUGBUG see SFNContainer! */
  168.         USHORT   FAR  *p16SemRec;     /* pointer to head of 16 bit sem info */
  169.         USHORT   FAR  *pLibRec;       /* ptr to list of runtime libraries */
  170.         USHORT   FAR  *pShrMemRec;    /* ptr to list of shared mem handles */
  171.         USHORT   FAR  *pFSRec;        /* pointer to list of file handles */
  172. } qsPrec_t;
  173.  
  174. /*
  175.  *      16 bit system semaphore structure
  176.  *      ________________________________
  177.  *      |       pNextRec                |----|
  178.  *      |-------------------------------|    |
  179.  *      |SysSemData     :               |    |
  180.  *      |       SysSemOwner             |    |
  181.  *      |       SysSemFlag              |    |
  182.  *      |       SysSemRecCnt            |    |
  183.  *      |       SysSemProcCnt           |    |
  184.  *      |-------------------------------|    |
  185.  *      |-------------------------------|    |
  186.  *      |-------------------------------|    |
  187.  *      |       SysSemPtr               |    |
  188.  *      |-------------------------------|    |
  189.  *      |SysSemName:                    |    |
  190.  *      |       "pathname"              |    |
  191.  *      |-------------------------------|    |
  192.  *                                      <-----
  193.  */
  194.  
  195.  
  196. /* SysSemFlag values */
  197.  
  198. #define QS_SYSSEM_WAITING 0x01               /* a thread is waiting on the sem */
  199. #define QS_SYSSEM_MUXWAITING 0x02            /* a thread is muxwaiting on the sem */
  200. #define QS_SYSSEM_OWNER_DIED 0x04            /* the process/thread owning the sem died */
  201. #define QS_SYSSEM_EXCLUSIVE 0x08             /* indicates a exclusive system semaphore */
  202. #define QS_SYSSEM_NAME_CLEANUP 0x10          /* name table entry needs to be removed */
  203. #define QS_SYSSEM_THREAD_OWNER_DIED 0x20     /* the thread owning the sem died */
  204. #define QS_SYSSEM_EXITLIST_OWNER 0x40        /* the exitlist thread owns the sem */
  205.  
  206. typedef struct qsS16rec_s {   /* qsS16rec */
  207.         ULONG         NextRec;        /* offset to next record in buffer */
  208.                                       /* System Semaphore Table Structure */
  209.         USHORT        SysSemOwner ;   /* thread owning this semaphore */
  210.         UCHAR         SysSemFlag ;    /* system semaphore flag bit field */
  211.         UCHAR         SysSemRefCnt ;  /* number of references to this sys sem */
  212.         UCHAR         SysSemProcCnt ; /* number of requests for this owner */
  213.         UCHAR         SysSemPad ;     /* pad byte to round structure up to word */
  214.         USHORT        pad_sh;
  215.         USHORT        SemPtr;         /* RMP SysSemPtr field */
  216.         char          SemName;        /* start of semaphore name string */
  217. } qsS16rec_t;
  218.  
  219. typedef struct qsS16Headrec_s {  /* qsS16Hrec */
  220.         ULONG         SRecType;
  221.         ULONG         SpNextRec;      /* overlays NextRec of 1st qsS16rec_t*/
  222.         ULONG         S32SemRec;
  223.         ULONG         S16TblOff;      /* offset of SysSemDataTable */
  224.         ULONG         pSem16Rec;
  225. } qsS16Headrec_t;
  226.  
  227. /*
  228.  *      System wide Shared Mem information
  229.  *      ________________________________
  230.  *      |       NextRec                 |
  231.  *      |-------------------------------|
  232.  *      |       hmem                    |
  233.  *      |-------------------------------|
  234.  *      |       sel                     |
  235.  *      |-------------------------------|
  236.  *      |       refcnt                  |
  237.  *      |-------------------------------|
  238.  *      |       name                    |
  239.  *      |_______________________________|
  240.  *
  241.  */
  242. typedef struct qsMrec_s {  /* qsMrec */
  243.         ULONG         MemNextRec;       /* offset to next record in buffer */
  244.         USHORT        hmem;             /* handle for shared memory */
  245.         USHORT        sel;              /* selector */
  246.         USHORT        refcnt;           /* reference count */
  247.         char          Memname;          /* start of shared memory name string */
  248. } qsMrec_t;
  249.  
  250. /*
  251.  *      32 bit system semaphore structure
  252.  *      ________________________________
  253.  *      |       pNextRec                |----|
  254.  *      |-------------------------------|    |
  255.  *      |       QSHUN[0]                |    |
  256.  *      |-------------------------------|    |
  257.  *      |         MuxQ                  |    |
  258.  *      |-------------------------------|    |
  259.  *      |         OpenQ                 |    |
  260.  *      |-------------------------------|    |
  261.  *      |         SemName               |    |
  262.  *      |-------------------------------|<---|
  263.  *      |          .                    |
  264.  *      |          .                    |
  265.  *      |-------------------------------|<---|
  266.  *      |       pNextRec                |----|
  267.  *      |-------------------------------|    |
  268.  *      |       QSHUN[c32SSem-1]        |    |
  269.  *      |-------------------------------|    |
  270.  *      |         MuxQ                  |    |
  271.  *      |-------------------------------|    |
  272.  *      |         OpenQ                 |    |
  273.  *      |-------------------------------|    |
  274.  *      |         SemName               |    |
  275.  *      |-------------------------------|<---|
  276.  */
  277.  
  278. /*
  279.  *  32- bit Semaphore flags
  280.  */
  281.  
  282. #define QS_DC_SEM_SHARED   0x0001   //  Shared Mutex, Event or MUX semaphore
  283. #define QS_DCMW_WAIT_ANY   0x0002   //  Wait on any event/mutex to occur
  284. #define QS_DCMW_WAIT_ALL   0x0004   //  Wait on all events/mutexs to occur
  285. #define QS_DCM_MUTEX_SEM   0x0008   //  Mutex semaphore
  286. #define QS_DCE_EVENT_SEM   0x0010   //  Event semaphore
  287. #define QS_DCMW_MUX_SEM    0x0020   //  Muxwait semaphore
  288. #define QS_DC_SEM_PM       0x0040   //  PM Shared Event Semphore
  289. #define QS_DE_POSTED       0x0040   //  event sem is in the posted state
  290. #define QS_DM_OWNER_DIED   0x0080   //  The owning process died
  291. #define QS_DMW_MTX_MUX     0x0100   //  MUX contains mutex sems
  292. #define QS_DHO_SEM_OPEN    0x0200   //  Device drivers have opened this semaphore
  293. #define QS_DE_16BIT_MW     0x0400   //  Part of a 16-bit MuxWait
  294. #define QS_DCE_POSTONE     0x0800   //  Post one flag event semaphore
  295. #define QS_DCE_AUTORESET   0x1000   //  Auto-reset event semaphore
  296.  
  297. typedef struct qsopenq_s {    /* qsopenq */
  298.         PID           pidOpener;      /* process id of opening process */
  299.         USHORT        OpenCt;         /* number of opens for this process */
  300. } QSOPENQ;
  301. typedef struct qsevent_s {    /* qsevent */
  302.         QSOPENQ       *pOpenQ;        /* pointer to open q entries */
  303.         UCHAR         *pName;         /* pointer to semaphore name */
  304.         ULONG         *pMuxQ;         /* pointer to the mux queue */
  305.         USHORT        flags;
  306.         USHORT        PostCt;         /* # of posts */
  307. } QSEVENT;
  308. typedef struct qsmutex_s {    /* qsmutex */
  309.         QSOPENQ       *pOpenQ;        /* pointer to open q entries */
  310.         UCHAR         *pName;         /* pointer to semaphore name */
  311.         ULONG         *pMuxQ;         /* pointer to the mux queue */
  312.         USHORT        flags;
  313.         USHORT        ReqCt;          /* # of requests */
  314.         USHORT        SlotNum;        /* slot # of owning thread */
  315.         PADSHORT;
  316. } QSMUTEX;
  317. typedef struct qsmux_s {   /* qsmux */
  318.         QSOPENQ         *pOpenQ;        /* pointer to open q entries */
  319.         UCHAR           *pName;         /* pointer to semaphore name */
  320.         void            *pSemRec;       /* array of semaphore record entries */
  321.         USHORT          flags;
  322.         USHORT          cSemRec;        /* count of semaphore records */
  323.         USHORT          WaitCt;         /* # threads waiting on the mux */
  324.         PADSHORT;
  325. } QSMUX;
  326. typedef struct qsshun_s {  /* qsshun */
  327.         QSEVENT         qsSEvt;         /* shared event sem */
  328.         QSMUTEX         qsSMtx;         /* shared mutex sem */
  329.         QSMUX           qsSMux;         /* shared mux sem */
  330. } QSHUN;
  331. typedef struct qsS32rec_s {   /* qsS32rec */
  332.         void            *pNextRec;      /* pointer to next record in buffer */
  333.         QSHUN           qsh;            /* qstate version of SHUN record */
  334. } qsS32rec_t;
  335.  
  336. /*
  337.  *      System wide MTE information
  338.  *      ________________________________
  339.  *      |       pNextRec                |----|
  340.  *      |-------------------------------|    |
  341.  *      |       hmte                    |    |
  342.  *      |-------------------------------|    |
  343.  *      |       ctImpMod                |    |
  344.  *      |-------------------------------|    |
  345.  *      |       ctObj                   |    |
  346.  *      |-------------------------------|    |
  347.  *      |       pObjInfo                |----|----------|
  348.  *      |-------------------------------|    |          |
  349.  *      |       pName                   |----|----|     |
  350.  *      |-------------------------------|    |    |     |
  351.  *      |       imported module handles |    |    |     |
  352.  *      |          .                    |    |    |     |
  353.  *      |          .                    |    |    |     |
  354.  *      |          .                    |    |    |     |
  355.  *      |-------------------------------| <--|----|     |
  356.  *      |       "pathname"              |    |          |
  357.  *      |-------------------------------| <--|----------|
  358.  *      |       Object records          |    |
  359.  *      |       (if requested)          |    |
  360.  *      |_______________________________|    |
  361.  *                                      <-----
  362.  *      NOTE that if the level bit is set to QS_MTE, the base Lib record will be followed
  363.  *      by a series of object records (qsLObj_t); one for each object of the
  364.  *      module.
  365.  */
  366.  
  367. typedef struct qsLObjrec_s {  /* qsLOrec */
  368.         ULONG         oaddr;  /* object address */
  369.         ULONG         osize;  /* object size */
  370.         ULONG         oflags; /* object flags */
  371. } qsLObjrec_t;
  372.  
  373. typedef struct qsLrec_s {     /* qsLrec */
  374.         void  FAR        *pNextRec;      /* pointer to next record in buffer */
  375.         USHORT           hmte;           /* handle for this mte */
  376.         USHORT           fFlat;          /* true if 32 bit module */
  377.         ULONG            ctImpMod;       /* # of imported modules in table */
  378.         ULONG            ctObj;          /* # of objects in module (mte_objcnt)*/
  379.         qsLObjrec_t FAR  *pObjInfo;      /* pointer to per object info if any */
  380.         UCHAR     FAR    *pName;         /* -> name string following struc */
  381. #if 0
  382.         USHORT            ahmte[1];      /* Array of imported module hmtes */
  383. #endif
  384. } qsLrec_t;
  385.  
  386. /* Used for 9th bit (Extended Module Data Summary)*/
  387. typedef struct qsExLrec_s {   /* qsELrec */
  388.         struct          qsExLrec_s *next; /*  Pointer to next Extended Module Data */
  389.         USHORT          hndmod;           /*  Module Handle */
  390.         USHORT          pid;              /*  Process ID */
  391.         USHORT          type;             /*  Type of Module */
  392.         ULONG           refcnt;           /*  Size of reference array */
  393.         ULONG           segcnt;           /*  Number of segments in module */
  394.         void            *_reserved_;
  395.         UCHAR FAR       *name;            /*  Pointer to Module Name  */
  396.         ULONG           ModuleVersion;    /*  Module version value  */
  397.         UCHAR FAR       *ShortModName;    /*  New Pointer to Module short name */
  398.         ULONG           modref;           /*  Start of array of handles of module */
  399. }qsExLrec_t;
  400.  
  401. /*
  402.  *      System wide FILE information
  403.  *      ________________________________
  404.  *      |       RecType                 |
  405.  *      |-------------------------------|
  406.  *      |       pNextRec                |-------|
  407.  *      |-------------------------------|       |
  408.  *      |       ctSft                   |       |
  409.  *      |-------------------------------|       |
  410.  *      |       pSft                    |---|   |
  411.  *      |-------------------------------|   |   |
  412.  *      |       name                    |   |   |
  413.  *      |-------------------------------|<--|   |
  414.  *      |       qsSft[0]                |       |
  415.  *      |-------------------------------|       |
  416.  *      |       ...                     |       |
  417.  *      |-------------------------------|       |
  418.  *      |       qsSft[ctSft -1]         |       |
  419.  *      |_______________________________|       |
  420.  *      |       name                    |
  421.  *      |_______________________________|
  422.  *                                      <-------|
  423.  */
  424. typedef struct qsSft_s {   /* qsSft - the size of this should be 0x16! */
  425.         USHORT        sfn;            /* 0 SFN sf_fsi.sfi_selfSFN */
  426.         USHORT        refcnt;         /* 2 sf_ref_count */
  427.         USHORT        flags;          /* 4 sf_flags */
  428.         USHORT        flags2;         /* 6 sf_flags2 */
  429.         USHORT        mode;           /* 8 sf_fsi.sfi_mode - mode of access */
  430.         USHORT        mode2;          /* 10 sf_fsi.sfi_mode2 - mode of access */
  431.         ULONG         size;           /* 12 sf_fsi.sfi_size */
  432.         USHORT        hVPB;           /* 16 sf_fsi.sfi_hVPB handle of volume */
  433.         USHORT        attr;           /* 18 sf_attr */
  434.         PADSHORT;                     /* 20 */
  435. } qsSft_t;
  436.  
  437. typedef struct qsFrec_s {  /* qsFrec */
  438.         ULONG         RecType;        /* Record Type */
  439.         void          *pNextRec;      /* pointer to next record in buffer */
  440.         ULONG         ctSft;          /* # sft entries for this MFT entry */
  441.         qsSft_t       *pSft;          /* -> start of sft entries in buf */
  442. #if 0
  443.         char          name[1];        /* kso: start of name? */
  444. #endif
  445. } qsFrec_t;
  446.  
  447.  
  448. /* Pointer Record Structure
  449.  *      This structure is the first in the user buffer.
  450.  *      It contains pointers to heads of record types that are loaded
  451.  *      into the buffer.
  452.  */
  453.  
  454. typedef struct qsPtrRec_s {   /* qsPRec */
  455.         qsGrec_t        *pGlobalRec;
  456.         qsPrec_t        *pProcRec;      /* ptr to head of process records */
  457.         qsS16Headrec_t  *p16SemRec;     /* ptr to head of 16 bit sem recds */
  458.         qsS32rec_t      *p32SemRec;     /* ptr to head of 32 bit sem recds */
  459.         qsMrec_t        *pMemRec;       /* ptr to head of shared mem recs */
  460.         qsLrec_t        *pLibRec;       /* ptr to head of mte records */
  461.         qsMrec_t        *pShrMemRec;    /* ptr to head of shared mem records */
  462.         qsFrec_t        *pFSRec;        /* ptr to head of file sys records */
  463. } qsPtrRec_t;
  464.  
  465. #pragma pack()
  466.  
  467. #endif
  468.  
  469. /* IMPORTANT, the sizeof qsSft_t is 0x16 bytes! */
  470. #define SIZEOFQSSFT_T   0x16
  471.  
  472. /*******************************************************************************
  473. *   Structures and Typedefs                                                    *
  474. *******************************************************************************/
  475. typedef struct ProcessData
  476. {
  477.     USHORT       usPid;                 /* sort key - process identificator. */
  478.     ULONG        ulUserTime;            /* total time in user code */
  479.     ULONG        ulSysTime;             /* total time in system code */
  480.     BOOL         fDead;                 /* Dead flag. */
  481.     BOOL         fDirty;                /* Update flag. Set: update container element. */
  482.     ULONG        cbProcRec;             /* Size of all the data used in pProcRec. */
  483.     qsPrec_t    *pProcRec;              /* Pointer to data returned by DosQuerySysState */
  484.                                         /* Note that this data is voilatile! */
  485.     /* container stuff */
  486.     PVOID        pvRecordCore;          /* Pointer to container record core. */
  487.  
  488.     struct ProcessData *pNext;          /* Next pointer */
  489.     struct ProcessData *pPrev;          /* Prev pointer */
  490. } PROCESSDATA, *PPROCESSDATA;
  491.  
  492.  
  493. /*******************************************************************************
  494. *   Functions                                                                  *
  495. *******************************************************************************/
  496. BOOL            QSUpdateStateData(VOID);
  497. VOID            QSInsertProcessData(PPROCESSDATA pProcData);
  498. VOID            QSRemoveProcessData(PPROCESSDATA pProcData);
  499. PPROCESSDATA    QSGetProcessData(USHORT usPid);
  500. PPROCESSDATA    QSGetFirstProcessDataNode(VOID);
  501. qsLrec_t *      QSGetMteData(register USHORT hMTE);
  502. qsLrec_t *      QSGetMteFirstData(VOID);
  503. qsFrec_t *      QSGetFSFirstData(VOID);
  504. qsFrec_t *      QSGetSfnData(USHORT usSFN);
  505. VOID            QSDumpProcessData(VOID);
  506. VOID            QSDumpFileSystemData(VOID);
  507.  
  508. APIRET  APIENTRY DosQuerySysState(ULONG EntityList,
  509.                                   ULONG EntityLevel,
  510.                                   PID pid,
  511.                                   TID tid,
  512.                                   PVOID pDataBuf,
  513.                                   ULONG cbBuf);
  514. #ifdef __cplusplus
  515. }
  516. #endif
  517.  
  518. #endif
  519.