X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2Fwin32%2FConsoleHandler.c;h=12ab45dad5152e656c6ee8d23742ee5d3f26e44f;hb=3cdb0ada5aecbcbe940bacf577c02c41bc65c629;hp=cc0365b3447fee1ef457bb309791e11d72f72871;hpb=47936fa626f195b057de16b35c0e6ca40666fc62;p=ghc-hetmet.git diff --git a/rts/win32/ConsoleHandler.c b/rts/win32/ConsoleHandler.c index cc0365b..12ab45d 100644 --- a/rts/win32/ConsoleHandler.c +++ b/rts/win32/ConsoleHandler.c @@ -3,6 +3,7 @@ * */ #include "Rts.h" +#include "Storage.h" #include #include "ConsoleHandler.h" #include "SchedAPI.h" @@ -10,6 +11,7 @@ #include "RtsUtils.h" #include "RtsFlags.h" #include "AsyncIO.h" +#include "Stable.h" #include "RtsSignals.h" extern int stg_InstallConsoleEvent(int action, StgStablePtr *handler); @@ -46,6 +48,15 @@ initUserSignals(void) return; } +/* Seems to be a bit of an orphan...where used? */ +void +finiUserSignals(void) +{ + if (hConsoleEvent != INVALID_HANDLE_VALUE) { + CloseHandle(hConsoleEvent); + } +} + /* * Function: shutdown_handler() * @@ -178,7 +189,7 @@ void startSignalHandlers(Capability *cap) * 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) { // nothing to mark; the console handler is a StablePtr which is // already treated as a root by the GC.