summaryrefslogtreecommitdiff
path: root/rts/Globals.c
diff options
context:
space:
mode:
authorNicolas Frisby <nicolas.frisby@gmail.com>2013-07-10 12:55:08 -0500
committerNicolas Frisby <nicolas.frisby@gmail.com>2013-07-16 11:27:43 -0500
commit193e0ee9aa8705dcc0020eaaf6bfb6714db6f9ca (patch)
tree4370f61be38cd3c6737493fbc4d1cd2d92a2e69c /rts/Globals.c
parent4115f23c2df56fd8b30c62c78f41c091f9ca12a4 (diff)
downloadhaskell-193e0ee9aa8705dcc0020eaaf6bfb6714db6f9ca.tar.gz
adding FastString.string_table to the sharedCAF/Globals.c mechanism
Diffstat (limited to 'rts/Globals.c')
-rw-r--r--rts/Globals.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/rts/Globals.c b/rts/Globals.c
index 1aafe21879..2e4b99474f 100644
--- a/rts/Globals.c
+++ b/rts/Globals.c
@@ -7,8 +7,13 @@
* even when multiple versions of the library are loaded. e.g. see
* Data.Typeable and GHC.Conc.
*
- * If/when we switch to a dynamically-linked GHCi, this can all go
- * away, because there would be just one copy of each library.
+ * How are multiple versions of a library loaded? Examples:
+ *
+ * base - a statically-linked ghci has its own copy, so might libraries it
+ * dynamically loads
+ *
+ * libHSghc - a statically-linked ghc has its own copy and so will Core
+ * plugins it dynamically loads (cf CoreMonad.reinitializeGlobals)
*
* ---------------------------------------------------------------------------*/
@@ -27,6 +32,7 @@ typedef enum {
SystemEventThreadIOManagerThreadStore,
SystemTimerThreadEventManagerStore,
SystemTimerThreadIOManagerThreadStore,
+ LibHSghcFastStringTable,
MaxStoreKey
} StoreKey;
@@ -128,3 +134,9 @@ getOrSetSystemTimerThreadIOManagerThreadStore(StgStablePtr ptr)
{
return getOrSetKey(SystemTimerThreadIOManagerThreadStore,ptr);
}
+
+StgStablePtr
+getOrSetLibHSghcFastStringTable(StgStablePtr ptr)
+{
+ return getOrSetKey(LibHSghcFastStringTable,ptr);
+}