+ The blackhole queue
+
+ Threads on this list behave like weak pointers during the normal
+ phase of garbage collection: if the blackhole is reachable, then
+ the thread is reachable too.
+ -------------------------------------------------------------------------- */
+static rtsBool
+traverse_blackhole_queue (void)
+{
+ StgTSO *prev, *t, *tmp;
+ rtsBool flag;
+
+ flag = rtsFalse;
+ prev = NULL;
+
+ for (t = blackhole_queue; t != END_TSO_QUEUE; prev=t, t = t->link) {
+ if (! (tmp = (StgTSO *)isAlive((StgClosure*)t))) {
+ if (isAlive(t->block_info.closure)) {
+ t = (StgTSO *)evacuate((StgClosure *)t);
+ if (prev) prev->link = t;
+ flag = rtsTrue;
+ }
+ }
+ }
+ return flag;
+}
+
+/* -----------------------------------------------------------------------------