summaryrefslogtreecommitdiff
path: root/rts
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2016-11-30 10:54:45 -0500
committerBen Gamari <ben@smart-cactus.org>2016-11-30 10:56:10 -0500
commite2330b6dde805a5507898c3c4ddf38599df969da (patch)
treed52c52b99f510553b2d1733d006747d75be68a6d /rts
parent03766cdbd26855e50719bd8ffcaf19898bd33f16 (diff)
downloadhaskell-e2330b6dde805a5507898c3c4ddf38599df969da.tar.gz
Revert "Make globals use sharedCAF"
This reverts commit 6f7ed1e51bf360621a3c2a447045ab3012f68575 due to breakage of the build on Windows.
Diffstat (limited to 'rts')
-rw-r--r--rts/Globals.c79
1 files changed, 54 insertions, 25 deletions
diff --git a/rts/Globals.c b/rts/Globals.c
index b5da6d9295..e3445c8d7b 100644
--- a/rts/Globals.c
+++ b/rts/Globals.c
@@ -13,7 +13,7 @@
* dynamically loads
*
* libHSghc - a statically-linked ghc has its own copy and so will Core
- * plugins it dynamically loads.
+ * plugins it dynamically loads (cf CoreMonad.reinitializeGlobals)
*
* ---------------------------------------------------------------------------*/
@@ -33,11 +33,6 @@ typedef enum {
SystemTimerThreadEventManagerStore,
SystemTimerThreadIOManagerThreadStore,
LibHSghcFastStringTable,
- LibHSghcPersistentLinkerState,
- LibHSghcInitLinkerDone,
- LibHSghcGlobalDynFlags,
- LibHSghcStaticOptions,
- LibHSghcStaticOptionsReady,
MaxStoreKey
} StoreKey;
@@ -92,22 +87,56 @@ static StgStablePtr getOrSetKey(StoreKey key, StgStablePtr ptr)
return ret;
}
-#define mkStoreAccessor(name) \
- StgStablePtr \
- getOrSet##name(StgStablePtr ptr) \
- { return getOrSetKey(name, ptr); }
-
-mkStoreAccessor(GHCConcSignalSignalHandlerStore)
-mkStoreAccessor(GHCConcWindowsPendingDelaysStore)
-mkStoreAccessor(GHCConcWindowsIOManagerThreadStore)
-mkStoreAccessor(GHCConcWindowsProddingStore)
-mkStoreAccessor(SystemEventThreadEventManagerStore)
-mkStoreAccessor(SystemEventThreadIOManagerThreadStore)
-mkStoreAccessor(SystemTimerThreadEventManagerStore)
-mkStoreAccessor(SystemTimerThreadIOManagerThreadStore)
-mkStoreAccessor(LibHSghcFastStringTable)
-mkStoreAccessor(LibHSghcPersistentLinkerState)
-mkStoreAccessor(LibHSghcInitLinkerDone)
-mkStoreAccessor(LibHSghcGlobalDynFlags)
-mkStoreAccessor(LibHSghcStaticOptions)
-mkStoreAccessor(LibHSghcStaticOptionsReady)
+StgStablePtr
+getOrSetGHCConcSignalSignalHandlerStore(StgStablePtr ptr)
+{
+ return getOrSetKey(GHCConcSignalSignalHandlerStore,ptr);
+}
+
+StgStablePtr
+getOrSetGHCConcWindowsPendingDelaysStore(StgStablePtr ptr)
+{
+ return getOrSetKey(GHCConcWindowsPendingDelaysStore,ptr);
+}
+
+StgStablePtr
+getOrSetGHCConcWindowsIOManagerThreadStore(StgStablePtr ptr)
+{
+ return getOrSetKey(GHCConcWindowsIOManagerThreadStore,ptr);
+}
+
+StgStablePtr
+getOrSetGHCConcWindowsProddingStore(StgStablePtr ptr)
+{
+ return getOrSetKey(GHCConcWindowsProddingStore,ptr);
+}
+
+StgStablePtr
+getOrSetSystemEventThreadEventManagerStore(StgStablePtr ptr)
+{
+ return getOrSetKey(SystemEventThreadEventManagerStore,ptr);
+}
+
+StgStablePtr
+getOrSetSystemEventThreadIOManagerThreadStore(StgStablePtr ptr)
+{
+ return getOrSetKey(SystemEventThreadIOManagerThreadStore,ptr);
+}
+
+StgStablePtr
+getOrSetSystemTimerThreadEventManagerStore(StgStablePtr ptr)
+{
+ return getOrSetKey(SystemTimerThreadEventManagerStore,ptr);
+}
+
+StgStablePtr
+getOrSetSystemTimerThreadIOManagerThreadStore(StgStablePtr ptr)
+{
+ return getOrSetKey(SystemTimerThreadIOManagerThreadStore,ptr);
+}
+
+StgStablePtr
+getOrSetLibHSghcFastStringTable(StgStablePtr ptr)
+{
+ return getOrSetKey(LibHSghcFastStringTable,ptr);
+}