PPC: Implement SMP primitives using gcc built-ins
[ghc.git] / includes / rts / IOManager.h
1 /* -----------------------------------------------------------------------------
2 *
3 * (c) The GHC Team, 1998-2009
4 *
5 * IO Manager functionality in the RTS
6 *
7 * Do not #include this file directly: #include "Rts.h" instead.
8 *
9 * To understand the structure of the RTS headers, see the wiki:
10 * http://ghc.haskell.org/trac/ghc/wiki/Commentary/SourceTree/Includes
11 *
12 * -------------------------------------------------------------------------- */
13
14 #ifndef RTS_IOMANAGER_H
15 #define RTS_IOMANAGER_H
16
17 #if defined(mingw32_HOST_OS)
18
19 int rts_InstallConsoleEvent ( int action, StgStablePtr *handler );
20 void rts_ConsoleHandlerDone ( int ev );
21 extern StgInt console_handler;
22
23 void * getIOManagerEvent (void);
24 HsWord32 readIOManagerEvent (void);
25 void sendIOManagerEvent (HsWord32 event);
26
27 #else
28
29 void setIOManagerControlFd (uint32_t cap_no, int fd);
30 void setTimerManagerControlFd(int fd);
31 void setIOManagerWakeupFd (int fd);
32
33 #endif
34
35 //
36 // Communicating with the IO manager thread (see GHC.Conc).
37 // Posix implementation in posix/Signals.c
38 // Win32 implementation in win32/ThrIOManager.c
39 //
40 void ioManagerWakeup (void);
41 #if defined(THREADED_RTS)
42 void ioManagerDie (void);
43 void ioManagerStart (void);
44 #endif
45
46 #endif /* RTS_IOMANAGER_H */