diff options
author | Simon Marlow <marlowsd@gmail.com> | 2010-05-18 11:32:14 +0000 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2010-05-18 11:32:14 +0000 |
commit | f9b4bc220a684a970a58dafa9e57d665d29b4121 (patch) | |
tree | a43e79257e8a0b159e47821b202af26c04b8b8e3 /rts/Schedule.c | |
parent | 8e4fd5b3be763fc960db16deddd4efc381b815df (diff) | |
download | haskell-f9b4bc220a684a970a58dafa9e57d665d29b4121.tar.gz |
Fix #4074 (I hope).
1. allow multiple threads to call startTimer()/stopTimer() pairs
2. disable the timer around fork() in forkProcess()
A corresponding change to the process package is required.
Diffstat (limited to 'rts/Schedule.c')
-rw-r--r-- | rts/Schedule.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/rts/Schedule.c b/rts/Schedule.c index 66a13883f0..8db125da74 100644 --- a/rts/Schedule.c +++ b/rts/Schedule.c @@ -1533,10 +1533,14 @@ forkProcess(HsStablePtr *entry ACQUIRE_LOCK(&cap->lock); ACQUIRE_LOCK(&cap->running_task->lock); + stopTimer(); // See #4074 + pid = fork(); if (pid) { // parent + startTimer(); // #4074 + RELEASE_LOCK(&sched_mutex); RELEASE_LOCK(&cap->lock); RELEASE_LOCK(&cap->running_task->lock); |