summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorMoritz Angermann <moritz.angermann@gmail.com>2016-12-11 11:32:28 +0000
committerTamar Christina <tamar@zhox.com>2016-12-11 15:29:17 +0000
commitc3c702441137dc8f7ee0dd5ac313be96d625459a (patch)
treea59633ac90b97a7df7c09db560bf8030c15ebf2e /includes
parent490b9429a8ed3c55d17bf0964fb14582eb206a3d (diff)
downloadhaskell-c3c702441137dc8f7ee0dd5ac313be96d625459a.tar.gz
Make globals use sharedCAF
Summary: The use of globals is quite painful when multiple rts are loaded, e.g. when plugins are loaded, which bring in a second rts. The sharedCAF appraoch was employed for the FastStringTable; I've taken the libery to extend this to the other globals I could find. This is a reboot of D2575, that should hopefully not exhibit the same windows build issues. Reviewers: Phyx, simonmar, goldfire, bgamari, austin, hvr, erikd Reviewed By: Phyx, simonmar, bgamari Subscribers: mpickering, thomie Differential Revision: https://phabricator.haskell.org/D2773
Diffstat (limited to 'includes')
-rw-r--r--includes/rts/Globals.h27
1 files changed, 18 insertions, 9 deletions
diff --git a/includes/rts/Globals.h b/includes/rts/Globals.h
index 00553610f5..e3ff643556 100644
--- a/includes/rts/Globals.h
+++ b/includes/rts/Globals.h
@@ -17,14 +17,23 @@
#ifndef RTS_GLOBALS_H
#define RTS_GLOBALS_H
-StgStablePtr getOrSetGHCConcSignalSignalHandlerStore(StgStablePtr value);
-StgStablePtr getOrSetGHCConcWindowsPendingDelaysStore(StgStablePtr ptr);
-StgStablePtr getOrSetGHCConcWindowsIOManagerThreadStore(StgStablePtr ptr);
-StgStablePtr getOrSetGHCConcWindowsProddingStore(StgStablePtr ptr);
-StgStablePtr getOrSetSystemEventThreadEventManagerStore(StgStablePtr ptr);
-StgStablePtr getOrSetSystemEventThreadIOManagerThreadStore(StgStablePtr ptr);
-StgStablePtr getOrSetSystemTimerThreadEventManagerStore(StgStablePtr ptr);
-StgStablePtr getOrSetSystemTimerThreadIOManagerThreadStore(StgStablePtr ptr);
-StgStablePtr getOrSetLibHSghcFastStringTable(StgStablePtr ptr);
+#define mkStoreAccessorPrototype(name) \
+ StgStablePtr \
+ getOrSet##name(StgStablePtr ptr);
+
+mkStoreAccessorPrototype(GHCConcSignalSignalHandlerStore)
+mkStoreAccessorPrototype(GHCConcWindowsPendingDelaysStore)
+mkStoreAccessorPrototype(GHCConcWindowsIOManagerThreadStore)
+mkStoreAccessorPrototype(GHCConcWindowsProddingStore)
+mkStoreAccessorPrototype(SystemEventThreadEventManagerStore)
+mkStoreAccessorPrototype(SystemEventThreadIOManagerThreadStore)
+mkStoreAccessorPrototype(SystemTimerThreadEventManagerStore)
+mkStoreAccessorPrototype(SystemTimerThreadIOManagerThreadStore)
+mkStoreAccessorPrototype(LibHSghcFastStringTable)
+mkStoreAccessorPrototype(LibHSghcPersistentLinkerState)
+mkStoreAccessorPrototype(LibHSghcInitLinkerDone)
+mkStoreAccessorPrototype(LibHSghcGlobalDynFlags)
+mkStoreAccessorPrototype(LibHSghcStaticOptions)
+mkStoreAccessorPrototype(LibHSghcStaticOptionsReady)
#endif /* RTS_GLOBALS_H */