// needs to acquire all the capabilities). We can't kill
// threads involved in foreign calls.
//
- // * sched_state := SCHED_INTERRUPTED
- //
// * somebody calls shutdownHaskell(), which calls exitScheduler()
//
// * sched_state := SCHED_SHUTTING_DOWN
/* scheduleDoGC() deletes all the threads */
cap = scheduleDoGC(cap,task,rtsFalse,GetRoots);
break;
- case SCHED_INTERRUPTED:
- IF_DEBUG(scheduler, sched_belch("SCHED_INTERRUPTED"));
- break;
case SCHED_SHUTTING_DOWN:
IF_DEBUG(scheduler, sched_belch("SCHED_SHUTTING_DOWN"));
// If we are a worker, just exit. If we're a bound thread
*/
if (sched_state >= SCHED_INTERRUPTING) {
deleteAllThreads(&capabilities[0]);
- sched_state = SCHED_INTERRUPTED;
+ sched_state = SCHED_SHUTTING_DOWN;
}
/* everybody back, start the GC.
#endif
// If we haven't killed all the threads yet, do it now.
- if (sched_state < SCHED_INTERRUPTED) {
+ if (sched_state < SCHED_SHUTTING_DOWN) {
sched_state = SCHED_INTERRUPTING;
scheduleDoGC(NULL,task,rtsFalse,GetRoots);
}
*/
#define SCHED_RUNNING 0 /* running as normal */
#define SCHED_INTERRUPTING 1 /* ^C detected, before threads are deleted */
-#define SCHED_INTERRUPTED 2 /* ^C detected, after threads deleted */
-#define SCHED_SHUTTING_DOWN 3 /* final shutdown */
+#define SCHED_SHUTTING_DOWN 2 /* final shutdown */
extern rtsBool RTS_VAR(sched_state);