X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;ds=sidebyside;f=rts%2Fwin32%2FConsoleHandler.h;h=0d09a67b94f8743806a8a05e5f8077477dce1edc;hb=c3685050fd288d928c4e26fb2e43fc33e304391c;hp=b09adf71cb49241310543730f00e658678c88317;hpb=0065d5ab628975892cea1ec7303f968c3338cbe1;p=ghc-hetmet.git diff --git a/rts/win32/ConsoleHandler.h b/rts/win32/ConsoleHandler.h index b09adf7..0d09a67 100644 --- a/rts/win32/ConsoleHandler.h +++ b/rts/win32/ConsoleHandler.h @@ -2,16 +2,23 @@ * Console control handler support. * */ -#ifndef __CONSOLEHANDLER_H__ -#define __CONSOLEHANDLER_H__ +#ifndef WIN32_CONSOLEHANDLER_H +#define WIN32_CONSOLEHANDLER_H /* * Console control handlers lets an application handle Ctrl+C, Ctrl+Break etc. * in Haskell under Win32. Akin to the Unix signal SIGINT. * - * The API offered by ConsoleHandler.h is identical to that of the signal handling - * code (which isn't supported under win32.) Unsurprisingly, the underlying impl - * is derived from the signal handling code also. + * The API offered by ConsoleHandler.h is identical to that of the + * signal handling code (which isn't supported under win32.) + * Unsurprisingly, the underlying impl is derived from the signal + * handling code also. + */ + +#if !defined(THREADED_RTS) +/* + * under THREADED_RTS, console events are passed to the IO manager + * thread, which starts up the handler. See ThrIOManager.c. */ /* @@ -45,14 +52,6 @@ extern StgInt stg_pending_events; extern void startSignalHandlers(Capability *cap); /* - * Function: handleSignalsInThisThread() - * - * Have current (OS) thread assume responsibility of handling console events/signals. - * Currently not used (by the console event handling code.) - */ -extern void handleSignalsInThisThread(void); - -/* * Function: rts_waitConsoleHandlerCompletion() * * Esoteric entry point used by worker thread that got woken @@ -60,4 +59,6 @@ extern void handleSignalsInThisThread(void); */ extern int rts_waitConsoleHandlerCompletion(void); -#endif /* __CONSOLEHANDLER_H__ */ +#endif /* THREADED_RTS */ + +#endif /* Win32_CONSOLEHANDLER_H */