/* Copyright (c) 1993 Xerox Corporation. All rights reserved. */ /* $Id$ $Date$ * * PCR_ThCtlTypes -- Datatypes for "Thread Control" interface. * * Nearly machine independent. * Mostly for use by GC and Debugger. * */ #ifndef __PCR_ThCtlTypes_h #define __PCR_ThCtlTypes_h 1 #include #include #include /* * public scheduling state */ typedef enum { /* idle: used internally, should not be seen by clients */ PCR_ThCtl_State_null = 0, /* ready to run */ PCR_ThCtl_State_ready = 1, /* waiting for ml or cv */ PCR_ThCtl_State_waitML = 2, PCR_ThCtl_State_waitCV = 3, /* terminated */ PCR_ThCtl_State_finished = 4, PCR_ThCtl_State_last = LONG_MAX } PCR_ThCtl_State; /* * public thread info */ typedef struct PCR_ThCtl_FrameDataRep * PCR_ThCtl_FrameDataPtr; typedef struct PCR_ThCtl_FrameDataRep { void * frame_sp; void * frame_fp; void * frame_pc; } PCR_ThCtl_FrameData; typedef struct PCR_ThCtl_TInfoRep * PCR_ThCtl_TInfoPtr; typedef struct PCR_ThCtl_TInfoRep { /* scheduling state */ PCR_ThCtl_State ti_state; union { struct { PCR_Th_ML * tiwm_ml; PCR_sigset_t tiwm_sigMask; PCR_Msec tiwm_wakeup; } tiw_mlInfo; struct { PCR_Th_CV * tiwc_cv; PCR_sigset_t tiwc_sigMask; PCR_Msec tiwc_wakeup; } tiw_cvInfo; } ti_waitInfo; PCR_Th_Pri ti_pri; PCR_Bool ti_ignoreRunExclusive; /* thread stack in use */ void * ti_stkLow; void * ti_stkHi; /* stack limit */ void * ti_stkLim; /* hottest saved frame in stack */ PCR_ThCtl_FrameData ti_frame; /* other machine-dependent context */ void * ti_mdContext; unsigned long ti_mdContextBytes; } PCR_ThCtl_TInfo; #endif /* ! __PCR_ThCtlTypes_h */ /* $Log$ */