A good bug: detectBlackHoles wasn't checking for ThreadRelocated,
which is why we sometimes get "no threads to run: infinite loop or
deadlock?" when we should get a NonTermination exception.
To be merged into the 4.08 branch.
/* ---------------------------------------------------------------------------
/* ---------------------------------------------------------------------------
- * $Id: Schedule.c,v 1.91 2001/02/12 13:14:13 simonmar Exp $
+ * $Id: Schedule.c,v 1.92 2001/03/02 14:25:04 simonmar Exp $
*
* (c) The GHC Team, 1998-2000
*
*
* (c) The GHC Team, 1998-2000
*
for (t = all_threads; t != END_TSO_QUEUE; t = t->global_link) {
for (t = all_threads; t != END_TSO_QUEUE; t = t->global_link) {
+ while (t->what_next == ThreadRelocated) {
+ t = t->link;
+ ASSERT(get_itbl(t)->type == TSO);
+ }
+
if (t->why_blocked != BlockedOnBlackHole) {
continue;
}
if (t->why_blocked != BlockedOnBlackHole) {
continue;
}