summaryrefslogtreecommitdiff
path: root/rts/Timer.c
diff options
context:
space:
mode:
authorSimon Marlow <simonmar@microsoft.com>2006-06-08 14:44:57 +0000
committerSimon Marlow <simonmar@microsoft.com>2006-06-08 14:44:57 +0000
commit7434fb5be86c7cc59c520dc07dc96b27b4fb1406 (patch)
tree2d1a6b2467cab24f780b356832d0dcb1307caf5a /rts/Timer.c
parent5a2769f0273dd389977e8283375e7920d183bdd4 (diff)
downloadhaskell-7434fb5be86c7cc59c520dc07dc96b27b4fb1406.tar.gz
fix possible ^C problems
Calling prodAllCapabilities() from interruptStgRts() was wrong, for the same reasons that we stopped doing it in handle_tick(). We now use the same mechanism (send a byte down the pipe to the IO manager thread), but abstract it in a wakeUpRts() function in the scheduler.
Diffstat (limited to 'rts/Timer.c')
-rw-r--r--rts/Timer.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/rts/Timer.c b/rts/Timer.c
index 4b13be4556..b4f5f8f130 100644
--- a/rts/Timer.c
+++ b/rts/Timer.c
@@ -72,20 +72,8 @@ handle_tick(int unused STG_UNUSED)
blackholes_need_checking = rtsTrue;
/* hack: re-use the blackholes_need_checking flag */
-#if !defined(mingw32_HOST_OS)
- // This forces the IO Manager thread to wakeup, which will
- // in turn ensure that some OS thread wakes up and runs the
- // scheduler loop, which will cause a GC and deadlock check.
- ioManagerWakeup();
-#else
- /* ToDo: this doesn't work. Can't invoke
- * pthread_cond_signal from a signal handler.
- * Furthermore, we can't prod a capability that we
- * might be holding. What can we do?
- */
- prodOneCapability();
-#endif
}
+ wakeUpRts();
break;
default:
break;