X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=includes%2Frts%2Fstorage%2FClosures.h;h=5f4f03541f088545160836d58e4ee8ac20e04c53;hb=f07b01e57f4c08a68e22eb81f25c865d1d7c15c3;hp=892826842ea155d2e0bb5bc508d45807f89b58fd;hpb=0417404f5d1230c9d291ea9f73e2831121c8ec99;p=ghc-hetmet.git diff --git a/includes/rts/storage/Closures.h b/includes/rts/storage/Closures.h index 8928268..5f4f035 100644 --- a/includes/rts/storage/Closures.h +++ b/includes/rts/storage/Closures.h @@ -124,12 +124,20 @@ typedef struct { StgHeader header; StgClosure *indirectee; StgClosure *static_link; - StgInfoTable *saved_info; + const StgInfoTable *saved_info; } StgIndStatic; +typedef struct StgBlockingQueue_ { + StgHeader header; + struct StgBlockingQueue_ *link; // here so it looks like an IND + StgClosure *bh; // the BLACKHOLE + StgTSO *owner; + struct MessageBlackHole_ *queue; +} StgBlockingQueue; + typedef struct { StgHeader header; - StgWord words; + StgWord bytes; StgWord payload[FLEXIBLE_ARRAY]; } StgArrWords; @@ -153,11 +161,16 @@ typedef struct _StgUpdateFrame { typedef struct { StgHeader header; - StgInt exceptions_blocked; + StgWord exceptions_blocked; StgClosure *handler; } StgCatchFrame; typedef struct { + const StgInfoTable* info; + struct StgStack_ *next_chunk; +} StgUnderflowFrame; + +typedef struct { StgHeader header; } StgStopFrame; @@ -297,11 +310,17 @@ typedef struct { /* Concurrent communication objects */ +typedef struct StgMVarTSOQueue_ { + StgHeader header; + struct StgMVarTSOQueue_ *link; + struct StgTSO_ *tso; +} StgMVarTSOQueue; + typedef struct { - StgHeader header; - struct StgTSO_ *head; - struct StgTSO_ *tail; - StgClosure* value; + StgHeader header; + struct StgMVarTSOQueue_ *head; + struct StgMVarTSOQueue_ *tail; + StgClosure* value; } StgMVar; @@ -390,10 +409,10 @@ typedef struct StgInvariantCheckQueue_ { struct StgTRecHeader_ { StgHeader header; - TRecState state; struct StgTRecHeader_ *enclosing_trec; StgTRecChunk *current_chunk; StgInvariantCheckQueue *invariants_to_check; + TRecState state; }; typedef struct { @@ -416,4 +435,34 @@ typedef struct { StgClosure *alt_code; } StgCatchRetryFrame; +/* ---------------------------------------------------------------------------- + Messages + ------------------------------------------------------------------------- */ + +typedef struct Message_ { + StgHeader header; + struct Message_ *link; +} Message; + +typedef struct MessageWakeup_ { + StgHeader header; + Message *link; + StgTSO *tso; +} MessageWakeup; + +typedef struct MessageThrowTo_ { + StgHeader header; + struct MessageThrowTo_ *link; + StgTSO *source; + StgTSO *target; + StgClosure *exception; +} MessageThrowTo; + +typedef struct MessageBlackHole_ { + StgHeader header; + struct MessageBlackHole_ *link; + StgTSO *tso; + StgClosure *bh; +} MessageBlackHole; + #endif /* RTS_STORAGE_CLOSURES_H */