*/
ACQUIRE_LOCK(&sched_mutex);
tso->id = next_thread_id++; // while we have the mutex
- tso->global_link = all_threads;
- all_threads = tso;
+ tso->global_link = g0s0->threads;
+ g0s0->threads = tso;
RELEASE_LOCK(&sched_mutex);
#if defined(DIST)
printAllThreads(void)
{
StgTSO *t, *next;
- nat i;
+ nat i, s;
Capability *cap;
# if defined(GRAN)
}
debugBelch("other threads:\n");
- for (t = all_threads; t != END_TSO_QUEUE; t = next) {
+ for (s = 0; s < total_steps; s++) {
+ for (t = all_steps[s].threads; t != END_TSO_QUEUE; t = next) {
if (t->why_blocked != NotBlocked) {
printThreadStatus(t);
}
} else {
next = t->global_link;
}
+ }
}
}