home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / listings / v_11_04 / 1104090a < prev    next >
Text File  |  1993-01-31  |  2KB  |  53 lines

  1. Task Control Block (tsk.h)
  2.  
  3. struct tcb_rec {
  4.    queue          cqueue;   /* Current queue link */
  5.    queheadptr     qhead;    /* Queue head pointer */
  6.    byteptr        stkbot;   /* Task stack bottom */
  7.    volatile byte  state;    /* Task state */
  8.    byte           flags;    /* Task flags */
  9.  
  10.    byteptr        stack;    /* Task register save area */
  11.    word           t_ax;
  12.    word           t_cx;
  13.    word           t_dx;
  14.    word           t_si;
  15.    word           t_di;
  16.    word           t_bp;
  17.    word           t_es;
  18.    word           t_ds;
  19.  
  20.    tlink           timerq;    /* Timer queue link */
  21.    volatile farptr retptr;     /* Event return pointer */
  22.    volatile int    retsize;    /* Return buffer size for pipes */
  23.  
  24.    funcptr     save_func;
  25.    funcptr     rest_func;
  26.    farptr      user_ptr;     /* User defined parameter */
  27. #if (GROUPS)
  28.    gcbptr      group;        /* Current Group control block ptr */
  29.    gcbptr      homegroup;    /* Creating Group control block ptr */
  30. #endif
  31. #if (DOS)
  32.    funcptr     sched_ent_func;      /* Used by DOS handler */
  33.    volatile byte indos;            /* Flag for use by DOS handler 
  34. */
  35.    volatile byte t_new;            /* New task flag for DOS save */
  36.    word        base_psp;           /* Base PSP segment */
  37.    dword       psp_sssp;           /* Saved PSP SS/SP value */
  38.    byte        swap_area [DOSSWAPSIZE];    /* DOS vars save area */
  39. #endif
  40. #if (TSK_NAMED)
  41.    namerec     name;
  42. #endif
  43. #if (EMS)
  44.    byte        ems_map [EMS_SAVE_SIZE];
  45. #endif
  46. #if (NDP)
  47.    ndpsave_t   ndpsave;    /* 80x87 save area */
  48. #endif
  49.    };
  50.  
  51. /* End of File */ 
  52.  
  53.