summaryrefslogtreecommitdiff
path: root/rts/Schedule.c
diff options
context:
space:
mode:
authorIavor S. Diatchki <iavor.diatchki@gmail.com>2014-07-19 14:29:57 -0700
committerIavor S. Diatchki <iavor.diatchki@gmail.com>2014-07-19 14:29:57 -0700
commit524634641c61ab42c555452f6f87119b27f6c331 (patch)
treef78d17bb6b09fb3b2e22cb4d93c2a3d45accc2d9 /rts/Schedule.c
parent79ad1d20c5500e17ce5daaf93b171131669bddad (diff)
parentc41b716d82b1722f909979d02a76e21e9b68886c (diff)
downloadhaskell-wip/ext-solver.tar.gz
Merge branch 'master' into wip/ext-solverwip/ext-solver
Diffstat (limited to 'rts/Schedule.c')
-rw-r--r--rts/Schedule.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/rts/Schedule.c b/rts/Schedule.c
index adf2b5cb39..7f8ced6f3e 100644
--- a/rts/Schedule.c
+++ b/rts/Schedule.c
@@ -1802,6 +1802,10 @@ forkProcess(HsStablePtr *entry
ACQUIRE_LOCK(&capabilities[i]->lock);
}
+#ifdef THREADED_RTS
+ ACQUIRE_LOCK(&all_tasks_mutex);
+#endif
+
stopTimer(); // See #4074
#if defined(TRACING)
@@ -1823,13 +1827,18 @@ forkProcess(HsStablePtr *entry
releaseCapability_(capabilities[i],rtsFalse);
RELEASE_LOCK(&capabilities[i]->lock);
}
+
+#ifdef THREADED_RTS
+ RELEASE_LOCK(&all_tasks_mutex);
+#endif
+
boundTaskExiting(task);
// just return the pid
return pid;
} else { // child
-
+
#if defined(THREADED_RTS)
initMutex(&sched_mutex);
initMutex(&sm_mutex);
@@ -1839,6 +1848,8 @@ forkProcess(HsStablePtr *entry
for (i=0; i < n_capabilities; i++) {
initMutex(&capabilities[i]->lock);
}
+
+ initMutex(&all_tasks_mutex);
#endif
#ifdef TRACING