Task Control Block (tsk.h)

struct tcb_rec {
   queue          cqueue;   /* Current queue link */
   queheadptr     qhead;    /* Queue head pointer */
   byteptr        stkbot;   /* Task stack bottom */
   volatile byte  state;    /* Task state */
   byte           flags;    /* Task flags */

   byteptr        stack;    /* Task register save area */
   word           t_ax;
   word           t_cx;
   word           t_dx;
   word           t_si;
   word           t_di;
   word           t_bp;
   word           t_es;
   word           t_ds;

   tlink           timerq;    /* Timer queue link */
   volatile farptr retptr;     /* Event return pointer */
   volatile int    retsize;    /* Return buffer size for pipes */

   funcptr     save_func;
   funcptr     rest_func;
   farptr      user_ptr;     /* User defined parameter */
#if (GROUPS)
   gcbptr      group;        /* Current Group control block ptr */
   gcbptr      homegroup;    /* Creating Group control block ptr */
#endif
#if (DOS)
   funcptr     sched_ent_func;      /* Used by DOS handler */
   volatile byte indos;            /* Flag for use by DOS handler 
*/
   volatile byte t_new;            /* New task flag for DOS save */
   word        base_psp;           /* Base PSP segment */
   dword       psp_sssp;           /* Saved PSP SS/SP value */
   byte        swap_area [DOSSWAPSIZE];    /* DOS vars save area */
#endif
#if (TSK_NAMED)
   namerec     name;
#endif
#if (EMS)
   byte        ems_map [EMS_SAVE_SIZE];
#endif
#if (NDP)
   ndpsave_t   ndpsave;    /* 80x87 save area */
#endif
   };

/* End of File */ 

