summaryrefslogtreecommitdiff
path: root/rts/win32/ConsoleHandler.c
Commit message (Collapse)AuthorAgeFilesLines
* winio: Multiple refactorings and support changes.Tamar Christina2020-07-151-3/+4
|
* Expunge #ifdef and #ifndef from the codebaseJohn Ericson2019-07-141-3/+3
| | | | | | | | These are unexploded minds as far as the linter is concerned. I don't want to hit in my MRs by mistake! I did this with `sed`, and then rolled back some changes in the docs, config.guess, and the linter itself.
* Remove markSignalHandlersÖmer Sinan Ağacan2018-04-161-12/+0
| | | | | | | | | | | | It's no-op on all platforms Reviewers: bgamari, simonmar, erikd, dfeuer Reviewed By: dfeuer Subscribers: dfeuer, thomie, carter Differential Revision: https://phabricator.haskell.org/D4588
* rts: Label all threads created by the RTSBen Gamari2017-10-161-6/+8
| | | | | | | | | | Reviewers: austin, erikd, simonmar Reviewed By: simonmar Subscribers: pacak, rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D4068
* Prefer #if defined to #ifdefBen Gamari2017-04-281-1/+1
| | | | Our new CPP linter enforces this.
* Use C99's boolBen Gamari2016-11-291-14/+14
| | | | | | | | | | | | Test Plan: Validate on lots of platforms Reviewers: erikd, simonmar, austin Reviewed By: erikd, simonmar Subscribers: michalt, thomie Differential Revision: https://phabricator.haskell.org/D2699
* Revert "rts: add Emacs 'Local Variables' to every .c file"Simon Marlow2014-09-291-8/+0
| | | | This reverts commit 39b5c1cbd8950755de400933cecca7b8deb4ffcd.
* rts: add Emacs 'Local Variables' to every .c fileAustin Seipp2014-07-281-0/+8
| | | | | | | | This will hopefully help ensure some basic consistency in the forward by overriding buffer variables. In particular, it sets the wrap length, the offset to 4, and turns off tabs. Signed-off-by: Austin Seipp <austin@well-typed.com>
* rts: delint/detab/dewhitespace win32/ConsoleHandler.cAustin Seipp2014-07-281-87/+88
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* Windows build fixesSimon Marlow2009-08-031-2/+0
|
* notice ^C exceptions when waiting for I/OSimon Marlow2008-11-131-0/+3
|
* FIX part of #2301, and #1619Simon Marlow2008-07-091-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | 2301: Control-C now causes the new exception (AsyncException UserInterrupt) to be raised in the main thread. The signal handler is set up by GHC.TopHandler.runMainIO, and can be overriden in the usual way by installing a new signal handler. The advantage is that now all programs will get a chance to clean up on ^C. When UserInterrupt is caught by the topmost handler, we now exit the program via kill(getpid(),SIGINT), which tells the parent process that we exited as a result of ^C, so the parent can take appropriate action (it might want to exit too, for example). One subtlety is that we have to use a weak reference to the ThreadId for the main thread, so that the signal handler doesn't prevent the main thread from being subject to deadlock detection. 1619: we now ignore SIGPIPE by default. Although POSIX says that a SIGPIPE should terminate the process by default, I wonder if this decision was made because many C applications failed to check the exit code from write(). In Haskell a failed write due to a closed pipe will generate an exception anyway, so the main difference is that we now get a useful error message instead of silent program termination. See #1619 for more discussion.
* Reorganisation to fix problems related to the gct register variableSimon Marlow2008-04-161-1/+1
| | | | | | | | | - GCAux.c contains code not compiled with the gct register enabled, it is callable from outside the GC - marking functions are moved to their relevant subsystems, outside the GC - mark_root needs to save the gct register, as it is called from outside the GC
* protect console handler against concurrent access (#1922)Simon Marlow2007-12-041-3/+11
|
* Free more things that we allocate2006-12-16Ian Lynagh2006-12-151-0/+5
|
* Add support for the IO manager thread on WindowsSimon Marlow2006-12-011-13/+23
| | | | | | | | | | | | | | | | | | | Fixes #637. The implications of this change are: - threadDelay on Windows no longer creates a new OS thread each time, instead it communicates with the IO manager thread in the same way as on Unix. - deadlock detection now works the same way on Windows as on Unix; that is the timer interrupt wakes up the IO manager thread, which causes the scheduler to check for deadlock. - Console events now get sent to the IO manager thread, in the same way as signals do on Unix. This means that console events should behave more reliably with -threaded on Windows. All this applies only with -threaded. Without -threaded, the old ConsoleEvent code is still used. After some testing, this could be pushed to the 6.6 branch.
* remove unused includes, now that Storage.h & Stable.h are included by Rts.hSimon Marlow2006-11-151-2/+0
|
* add a few #includes to make it compilesof@galois.com2006-11-011-1/+4
|
* Free Win32 Handles on shutdownSimon Marlow2006-08-251-0/+8
| | | | patch from #878
* markSignalHandlers(): implementation was unnecessary, and had a bugsimonmar@microsoft.com2006-06-061-4/+2
| | | | | | | | | | There's no need to mark the signal handler here, because it is stored in a StablePtr and hence is a root anyway. Furthermore, the call to evac() was passing the address of a local variable, which turned out to be harmless for copying GC, but fatal for compacting GC: compacting GC assumes that the addresses of the roots are the same each time. Fixes: possibly #783, possibly #776, definitely #787
* Reorganisation of the source treeSimon Marlow2006-04-071-0/+313
Most of the other users of the fptools build system have migrated to Cabal, and with the move to darcs we can now flatten the source tree without losing history, so here goes. The main change is that the ghc/ subdir is gone, and most of what it contained is now at the top level. The build system now makes no pretense at being multi-project, it is just the GHC build system. No doubt this will break many things, and there will be a period of instability while we fix the dependencies. A straightforward build should work, but I haven't yet fixed binary/source distributions. Changes to the Building Guide will follow, too.