X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2FCapability.h;h=4030b5efd463cf223d7632f40a52898a93c064a0;hb=79957d77c1bff767f1041d3fabdeb94d92a52878;hp=41974dc71030ec95dd4ff44749e6860a2e52b582;hpb=7effbbbbdfe7eb05c6402fa9337e358e7e9fadde;p=ghc-hetmet.git diff --git a/rts/Capability.h b/rts/Capability.h index 41974dc..4030b5e 100644 --- a/rts/Capability.h +++ b/rts/Capability.h @@ -88,11 +88,8 @@ struct Capability_ { Task *returning_tasks_hd; // Singly-linked, with head/tail Task *returning_tasks_tl; - // A list of threads to append to this Capability's run queue at - // the earliest opportunity. These are threads that have been - // woken up by another Capability. - StgTSO *wakeup_queue_hd; - StgTSO *wakeup_queue_tl; + // Messages, or END_TSO_QUEUE. + Message *inbox; SparkPool *sparks; @@ -285,6 +282,18 @@ void markCapabilities (evac_fn evac, void *user); void traverseSparkQueues (evac_fn evac, void *user); /* ----------------------------------------------------------------------------- + Messages + -------------------------------------------------------------------------- */ + +#ifdef THREADED_RTS + +INLINE_HEADER rtsBool emptyInbox(Capability *cap);; + +void sendMessage (Capability *cap, Message *msg); + +#endif // THREADED_RTS + +/* ----------------------------------------------------------------------------- * INLINE functions... private below here * -------------------------------------------------------------------------- */ @@ -333,6 +342,15 @@ contextSwitchCapability (Capability *cap) cap->context_switch = 1; } +#ifdef THREADED_RTS + +INLINE_HEADER rtsBool emptyInbox(Capability *cap) +{ + return (cap->inbox == (Message*)END_TSO_QUEUE); +} + +#endif + END_RTS_PRIVATE #endif /* CAPABILITY_H */