rts: Add api to pin a thread to a numa node but without fixing a capability
[ghc.git] / rts / Excn.h
1 /* -----------------------------------------------------------------------------
2 *
3 * (c) The GHC Team 1998-2000
4 *
5 * Hides indirection for EH handlers for different platforms
6 *
7 * ---------------------------------------------------------------------------*/
8
9 #ifndef EXCN_H
10 #define EXCN_H
11
12 #include "ghcconfig.h"
13
14 // On windows Excn provides two macros
15 // BEGIN_WINDOWS_VEH_HANDLER and END_WINDOWS_VEH_HANDLER, which
16 // will catch such exceptions in the entire process and die by
17 // printing a message and calling stg_exit(1).
18 //
19 // For other operating systems an empty macro is defined so
20 // that no #ifdefs are needed around the usage of these macros.
21
22
23 #if defined(mingw32_HOST_OS)
24 #include "win32/veh_excn.h"
25
26 #define BEGIN_WINDOWS_VEH_HANDLER __register_hs_exception_handler();
27 #define END_WINDOWS_VEH_HANDLER __unregister_hs_exception_handler();
28 #else
29 #define BEGIN_WINDOWS_VEH_HANDLER
30 #define END_WINDOWS_VEH_HANDLER
31 #endif /* mingw32_HOST_OS */
32
33 #endif /* EXCN_H */
34