also call initMutex on every task->lock, see #1391
authorSimon Marlow <simonmar@microsoft.com>
Tue, 9 Oct 2007 12:24:09 +0000 (12:24 +0000)
committerSimon Marlow <simonmar@microsoft.com>
Tue, 9 Oct 2007 12:24:09 +0000 (12:24 +0000)
rts/Schedule.c

index dee6a55..375520d 100644 (file)
@@ -2202,6 +2202,9 @@ forkProcess(HsStablePtr *entry
        ACQUIRE_LOCK(&sched_mutex);
        for (task = all_tasks; task != NULL; task=task->all_link) {
            if (task != cap->running_task) {
+#if defined(THREADED_RTS)
+                initMutex(&task->lock); // see #1391
+#endif
                discardTask(task);
            }
        }