/* -----------------------------------------------------------------------------
- * $Id: Schedule.c,v 1.8 1999/02/03 16:32:47 simonm Exp $
+ * $Id: Schedule.c,v 1.12 1999/02/26 16:46:50 simonm Exp $
+ *
+ * (c) The GHC Team, 1998-1999
*
* Scheduler
*
* t->link is already set to END_TSO_QUEUE.
*/
ASSERT(t->link == END_TSO_QUEUE);
- if (run_queue_tl != END_TSO_QUEUE) {
+ if (run_queue_tl == END_TSO_QUEUE) {
+ run_queue_hd = run_queue_tl = t;
+ } else {
ASSERT(get_itbl(run_queue_tl)->type == TSO);
if (run_queue_hd == run_queue_tl) {
run_queue_hd->link = t;
run_queue_tl = t;
} else {
run_queue_tl->link = t;
+ run_queue_tl = t;
}
- } else {
- run_queue_hd = run_queue_tl = t;
}
break;