home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / sd386v50.zip / sd386src.zip / THREADS.H < prev    next >
Text File  |  1996-02-21  |  4KB  |  70 lines

  1. /*****************************************************************************/
  2. /* File:                                             IBM INTERNAL USE ONLY   */
  3. /*   threads.h                                                               */
  4. /*                                                                           */
  5. /* Description:                                                              */
  6. /*   include file for multithread handling.                                  */
  7. /*                                                                           */
  8. /*                                                                           */
  9. /* History:                                                                  */
  10. /*                                                                           */
  11. /*   02/08/91 Creation of 32-bit SD86, from 16-bit version.                  */
  12. /*                                                                           */
  13. /*...Release 1.00                                                            */
  14. /*...                                                                        */
  15. /*... 02/08/91  100   made changes for 32-bit compilation.                   */
  16. /*...                                                                        */
  17. /*****************************************************************************/
  18.  
  19. #define TS_THAWED  0x00                 /* Values for the DebugState field   */
  20. #define TS_FROZEN  0x01                 /* thread is frozen                  */
  21. #define TS_DELAYED 0x02                 /* thread is ???                     */
  22.  
  23. #define TRC_C_RUNNABLE  0               /* Values for the ThreadState field */
  24. #define TRC_C_SUSPENDED 1
  25. #define TRC_C_BLOCKED   2
  26. #define TRC_C_CRITSEC   3
  27. /*DLJ*/
  28. #define TRC_C_ENDED     4               /*Return value for GetThreadState */
  29.                                         /*thead is null.*/
  30.  
  31. /*BUG: Two single steps on ended process crash it.*/
  32. /*DLJ*/
  33.  
  34. typedef struct _threadstat{
  35.   UCHAR  DebugState;
  36.   UCHAR  ThreadState;
  37.   USHORT Priority;                      /*                                100*/
  38. }THREADSTAT;                            /* Struct from TRC_C_ThrdStat (1.1)  */
  39.  
  40. typedef struct _threadinfo                                              /*827*/
  41. {                                                                       /*827*/
  42.  THREADSTAT ts;                                                         /*827*/
  43.  ULONG      eip;                                                        /*827*/
  44.  ULONG      tid;                                                        /*907*/
  45. }THREADINFO;
  46.  
  47. typedef struct tstate
  48. {
  49.  struct tstate *next;                   /* pointer to next tstate node       */
  50.  struct tstate *prev;                   /* pointer to previous node          */
  51.  UINT           pid;                    /* process id                        */
  52.  ULONG          tid;                    /* thread  id                        */
  53.  THREADSTAT     ts;                     /* thread  status                    */
  54.  UINT           cs;                     /* executing cs                      */
  55.  UINT           ip;                     /* executing ip                      */
  56.  UINT           mid;                    /* executing mid for this thread     */
  57.  UINT           lno;                    /* executing lno for this thread     */
  58.  int            sfi;                    /* source file index.                */
  59.  DEBFILE       *pdf;                    /* debug file this thread points to  */
  60. }TSTATE;
  61.  
  62. /*****************************************************************************/
  63. /* THREADWINDOWDATA STRUCTURE IS PASSED FROM ShowThds() TO ShowHelpBox() TO  */
  64. /*                         MenuThreads()                                     */
  65. /*****************************************************************************/
  66. typedef struct {
  67.   UINT   execitem;                      /* currently highlighted thread      */
  68.   UCHAR *pAllInfo;                      /* thread information block          */
  69. } ThreadsWindowData;
  70.