summaryrefslogtreecommitdiff
path: root/rts/hooks/Hooks.h
diff options
context:
space:
mode:
Diffstat (limited to 'rts/hooks/Hooks.h')
-rw-r--r--rts/hooks/Hooks.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/rts/hooks/Hooks.h b/rts/hooks/Hooks.h
new file mode 100644
index 0000000000..35a6011aaa
--- /dev/null
+++ b/rts/hooks/Hooks.h
@@ -0,0 +1,29 @@
+/* -----------------------------------------------------------------------------
+ *
+ * (c) The GHC Team, 1998-2009
+ *
+ * User-overridable RTS hooks.
+ *
+ * Do not #include this file directly: #include "Rts.h" instead.
+ *
+ * To understand the structure of the RTS headers, see the wiki:
+ * http://ghc.haskell.org/trac/ghc/wiki/Commentary/SourceTree/Includes
+ *
+ * ---------------------------------------------------------------------------*/
+
+#ifndef RTS_HOOKS_H
+#define RTS_HOOKS_H
+
+#include "BeginPrivate.h"
+
+extern char *ghc_rts_opts;
+
+extern void OnExitHook (void);
+extern void StackOverflowHook (W_ stack_size);
+extern void OutOfHeapHook (W_ request_size, W_ heap_size);
+extern void MallocFailHook (W_ request_size /* in bytes */, char *msg);
+extern void FlagDefaultsHook (void);
+
+#include "EndPrivate.h"
+
+#endif /* RTS_HOOKS_H */