static void schedule ( StgMainThread *mainThread, Capability *initialCapability );
void interruptStgRts ( void );
+#if !defined(PAR) && !defined(RTS_SUPPORTS_THREADS)
static void detectBlackHoles ( void );
+#endif
#if defined(RTS_SUPPORTS_THREADS)
/* ToDo: carefully document the invariants that go together
* Locks: sched_mutex is held upon entry and exit.
* -------------------------------------------------------------------------- */
+#if !defined(PAR) && !defined(RTS_SUPPORTS_THREADS)
static void
detectBlackHoles( void )
{
done: ;
}
}
+#endif
/* ----------------------------------------------------------------------------
* Debugging: why is a thread blocked
printAllThreads(void)
{
StgTSO *t;
- void *label;
# if defined(GRAN)
char time_string[TIME_STR_LEN], node_str[NODE_STR_LEN];
for (t = all_threads; t != END_TSO_QUEUE; t = t->global_link) {
debugBelch("\tthread %d @ %p ", t->id, (void *)t);
- label = lookupThreadLabel(t->id);
- if (label) debugBelch("[\"%s\"] ",(char *)label);
+#if defined(DEBUG)
+ {
+ void *label = lookupThreadLabel(t->id);
+ if (label) debugBelch("[\"%s\"] ",(char *)label);
+ }
+#endif
printThreadStatus(t);
debugBelch("\n");
}