summaryrefslogtreecommitdiff
path: root/rts/Stable.h
diff options
context:
space:
mode:
Diffstat (limited to 'rts/Stable.h')
-rw-r--r--rts/Stable.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/rts/Stable.h b/rts/Stable.h
new file mode 100644
index 0000000000..258a6bea80
--- /dev/null
+++ b/rts/Stable.h
@@ -0,0 +1,34 @@
+/* -----------------------------------------------------------------------------
+ *
+ * (c) The GHC Team, 1998-2004
+ *
+ * Stable Pointers: A stable pointer is represented as an index into
+ * the stable pointer table.
+ *
+ * StgStablePtr used to be a synonym for StgWord, but stable pointers
+ * are guaranteed to be void* on the C-side, so we have to do some
+ * occasional casting. Size is not a matter, because StgWord is always
+ * the same size as a void*.
+ *
+ * ---------------------------------------------------------------------------*/
+
+#ifndef STABLE_H
+#define STABLE_H
+
+#include "sm/GC.h" // for evac_fn below
+
+void freeStablePtr (StgStablePtr sp);
+
+void initStablePtrTable ( void );
+void exitStablePtrTable ( void );
+StgWord lookupStableName ( StgPtr p );
+
+void markStablePtrTable ( evac_fn evac, void *user );
+void threadStablePtrTable ( evac_fn evac, void *user );
+void gcStablePtrTable ( void );
+void updateStablePtrTable ( rtsBool full );
+
+void stablePtrPreGC ( void );
+void stablePtrPostGC ( void );
+
+#endif /* STABLE_H */