/* 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 <config/PCR←StdTypes.h> #include <th/PCR←ThTypes.h> #include <limits.h> /* * 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$ */