UNREG: use __builtin___clear_cache where available
[ghc.git] / rts / RtsDllMain.c
1 /* -----------------------------------------------------------------------------
2 *
3 * (c) The GHC Team 1999-2000
4 *
5 * Entry point for RTS-in-a-DLL
6 *
7 * ---------------------------------------------------------------------------*/
8
9 #include "PosixSource.h"
10 #include "Rts.h"
11 #include "RtsAPI.h"
12 #include "RtsDllMain.h"
13
14 #if defined(HAVE_WINDOWS_H)
15 #include <windows.h>
16 #endif
17
18 /* I'd be mildly surprised if this wasn't defined, but still. */
19 #if defined(COMPILING_WINDOWS_DLL)
20 BOOL
21 WINAPI
22 DllMain ( HINSTANCE hInstance STG_UNUSED
23 , DWORD reason
24 , LPVOID reserved STG_UNUSED
25 )
26 {
27 /*
28 * Note: the DllMain() doesn't call startupHaskell() for you,
29 * that is the task of users of the RTS. The reason is
30 * that *you* want to be able to control the arguments
31 * you pass to the RTS.
32 */
33 switch (reason) {
34
35 // shutdownHaskelAndExit() is already being called,
36 // so I don't think we need this. BL 2009/11/17
37
38 //case DLL_PROCESS_DETACH: shutdownHaskell();
39 }
40 return true;
41 }
42
43 #endif