+#if defined(PAR) || defined(GRAN)
+/*
+ StgBlockingQueueElement represents the types of closures that can be
+ found on a blocking queue: StgTSO, StgRBHSave, StgBlockedFetch.
+ (StgRBHSave can only appear at the end of a blocking queue).
+ Logically, this is a union type, but defining another struct with a common
+ layout is easier to handle in the code (same as for StgMutClosures).
+*/
+typedef struct StgBlockingQueueElement_ {
+ StgHeader header;
+ struct StgBlockingQueueElement_ *link;
+ StgMutClosure *mut_link;
+ struct StgClosure_ *payload[0];
+} StgBlockingQueueElement;
+
+typedef struct StgBlockingQueue_ {
+ StgHeader header;
+ struct StgBlockingQueueElement_ *blocking_queue;
+ StgMutClosure *mut_link;
+} StgBlockingQueue;
+
+/* this closure is hanging at the end of a blocking queue in (par setup only) */
+typedef struct StgRBHSave_ {