home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 11 Util / 11-Util.zip / memsz331.zip / Source.zip / DQPS.H < prev    next >
Text File  |  1995-10-16  |  5KB  |  104 lines

  1. /********************************************************************* DQPS.H
  2.  *                                                                          *
  3.  *                        DosQProcStatus Definitions                        *
  4.  *                                                                          *
  5.  ****************************************************************************/
  6.  
  7. #ifndef DQPS_H
  8. #define DQPS_H
  9.  
  10. APIRET16 APIENTRY16 DosQProcStatus ( PULONG buffer, USHORT buffer_size );
  11.  
  12. typedef struct qsGrec_s {
  13.    ULONG cThrds;                /* number of threads in use */
  14.    ULONG Reserved1;
  15.    ULONG Reserved2;
  16. } qsGrec_t;
  17.  
  18. typedef struct qsTrec_s {
  19.    ULONG RecType;               /* 00: Record Type */
  20.                                 /*     Thread rectype = 0x00000100 */
  21.    USHORT tid;                  /* 04: thread ID */
  22.    USHORT slot;                 /* 06: "unique" thread slot number */
  23.    ULONG sleepid;               /* 08: sleep id thread is sleeping on */
  24.    ULONG priority;              /* 0C: thread priority */
  25.    ULONG systime;               /* 10: thread system time */
  26.    ULONG usertime;              /* 14: thread user time */
  27.    UCHAR state;                 /* 18: thread state */
  28.    UCHAR padchar ;              /* 19: */
  29.    USHORT padshort ;            /* 1A: */
  30. } qsTrec_t;                     /* Total size: 28 bytes */
  31.  
  32. typedef struct qsPrec_s {
  33.    ULONG RecType;               /* 00: type of record being processed */
  34.                                 /*     process rectype = 0x00000001   */
  35.    qsTrec_t * _Seg16 pThrdRec;  /* 04: ptr to 1st thread rec for this prc */
  36.    USHORT pid;                  /* 08: process ID */
  37.    USHORT ppid;                 /* 0A: parent process ID */
  38.    ULONG type;                  /* 0C: process type */
  39.    ULONG stat;                  /* 10: process status */
  40.    ULONG sgid;                  /* 14: process screen group */
  41.    USHORT hMte;                 /* 18: program module handle for process */
  42.    USHORT cTCB;                 /* 1A: # of TCBs in use in process */
  43.    ULONG Reserved1 ;
  44.    ULONG Reserved2 ;
  45.    USHORT c16Sem;               /* 24: # of 16 bit system sems in use by proc */
  46.    USHORT cLib;                 /* 26: number of runtime linked libraries */
  47.    USHORT cShrMem;              /* 28: number of shared memory handles */
  48.    USHORT Reserved3 ;
  49.    USHORT * _Seg16 p16SemRec;   /* 2C: ptr to head of 16 bit sem inf for proc */
  50.    USHORT * _Seg16 pLibRec;     /* 30: ptr to list of runtime lib in use by process */
  51.    USHORT * _Seg16 pShrMemRec;  /* 34: ptr to list of shared mem handles in use by process */
  52.    ULONG Reserved4 ;            /* 38: */
  53. } qsPrec_t;                     /* Total size: 60 bytes */
  54.  
  55. typedef struct qsS16Headrec_s { 
  56.    ULONG SRecType;              /* semaphore rectype = 3 */
  57.    ULONG Reserved1;             /* overlays NextRec of 1st qsS16rec_t*/
  58.    ULONG Reserved2;
  59.    ULONG S16TblOff;             /* index of first semaphore,SEE PSTAT OUTPUT*/
  60.                                 /* System Semaphore Information Section     */
  61. } qsS16Headrec_t;
  62.  
  63. typedef struct qsS16rec_s { 
  64.    ULONG NextRec;               /* offset to next record in buffer*/
  65.    UINT  s_SysSemOwner ;        /* thread owning this semaphore   */
  66.    UCHAR s_SysSemFlag ;         /* system semaphore flag bit field*/
  67.    UCHAR s_SysSemRefCnt ;       /* number of references to this   */
  68.                                 /*   system semaphore             */
  69.    UCHAR s_SysSemProcCnt ;      /*number of requests by sem owner*/
  70.    UCHAR Reserved1;
  71.    ULONG Reserved2;
  72.    UINT  Reserved3;
  73.    CHAR  SemName;               /* start of semaphore name string */
  74. } qsS16rec_t;
  75.  
  76.  
  77. typedef struct qsMrec_s { 
  78.    ULONG  MemNextRec;           /* offset to next record in buffer */
  79.    USHORT hmem;                 /* handle for shared memory */
  80.    USHORT sel;                  /* shared memory selector */
  81.    USHORT refcnt;               /* reference count */
  82.    CHAR   Memname;              /* start of shared memory name string */
  83. } qsMrec_t;
  84.  
  85. typedef struct qsLrec_s { 
  86.    void * _Seg16 pNextRec;      /* pointer to next record in buffer */
  87.    USHORT hmte;                 /* handle for this mte */
  88.    USHORT Reserved1;            /* Reserved */
  89.    ULONG  ctImpMod;             /* # of imported modules in table */
  90.    ULONG  Reserved2;            /* Reserved */
  91.    ULONG  Reserved3;            /* Reserved */
  92.    UCHAR * _Seg16 pName;        /* ptr to name string following stru*/
  93. } qsLrec_t;
  94.  
  95. typedef struct qsPtrRec_s {
  96.    qsGrec_t *pGlobalRec;        /* ptr to the global data section */
  97.    qsPrec_t *pProcRec;          /* ptr to process record section  */
  98.    qsS16Headrec_t *p16SemRec;   /* ptr to 16 bit sem section      */
  99.    qsMrec_t *pShrMemRec;        /* ptr to shared mem section      */
  100.    qsLrec_t *pLibRec;           /* ptr to exe module record section */
  101. } qsPtrRec_t;
  102.  
  103. #endif
  104.