projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add a few #includes to make it compile
[ghc-hetmet.git]
/
rts
/
win32
/
ConsoleHandler.c
diff --git
a/rts/win32/ConsoleHandler.c
b/rts/win32/ConsoleHandler.c
index
d7096db
..
12ab45d
100644
(file)
--- a/
rts/win32/ConsoleHandler.c
+++ b/
rts/win32/ConsoleHandler.c
@@
-3,6
+3,7
@@
*
*/
#include "Rts.h"
*
*/
#include "Rts.h"
+#include "Storage.h"
#include <windows.h>
#include "ConsoleHandler.h"
#include "SchedAPI.h"
#include <windows.h>
#include "ConsoleHandler.h"
#include "SchedAPI.h"
@@
-10,6
+11,7
@@
#include "RtsUtils.h"
#include "RtsFlags.h"
#include "AsyncIO.h"
#include "RtsUtils.h"
#include "RtsFlags.h"
#include "AsyncIO.h"
+#include "Stable.h"
#include "RtsSignals.h"
extern int stg_InstallConsoleEvent(int action, StgStablePtr *handler);
#include "RtsSignals.h"
extern int stg_InstallConsoleEvent(int action, StgStablePtr *handler);
@@
-46,6
+48,15
@@
initUserSignals(void)
return;
}
return;
}
+/* Seems to be a bit of an orphan...where used? */
+void
+finiUserSignals(void)
+{
+ if (hConsoleEvent != INVALID_HANDLE_VALUE) {
+ CloseHandle(hConsoleEvent);
+ }
+}
+
/*
* Function: shutdown_handler()
*
/*
* Function: shutdown_handler()
*
@@
-178,12
+189,10
@@
void startSignalHandlers(Capability *cap)
* Evacuate the handler stack. _Assumes_ that console event delivery
* has already been blocked.
*/
* Evacuate the handler stack. _Assumes_ that console event delivery
* has already been blocked.
*/
-void markSignalHandlers (evac_fn evac)
+void markSignalHandlers (evac_fn evac STG_UNUSED)
{
{
- if (console_handler >= 0) {
- StgPtr p = deRefStablePtr((StgStablePtr)console_handler);
- evac((StgClosure**)(void *)&p);
- }
+ // nothing to mark; the console handler is a StablePtr which is
+ // already treated as a root by the GC.
}
}