+++ /dev/null
-/* -----------------------------------------------------------------------------
- *
- * (c) The GHC Team, 2006
- *
- * Support for shared Typeable
- *
- * ---------------------------------------------------------------------------*/\r
-\r
-#ifndef GHC_RTS_TYPEABLE_H\r
-#define GHC_RTS_TYPEABLE_H\r
-\r
-void initTypeableStore(void);\r
-void exitTypeableStore(void);\r
-\r
-StgPtr getOrSetTypeableStore(StgPtr);\r
-\r
-#endif\r
#include "RtsUtils.h"
#include "Schedule.h"
#include "Sparks.h"
-#include "RtsTypeable.h"
+#include "RtsGlobals.h"
#include "Timer.h"
#include "Trace.h"
SymI_HasProto(freeHaskellFunctionPtr) \
SymI_HasProto(freeStablePtr) \
SymI_HasProto(getOrSetTypeableStore) \
+ SymI_HasProto(getOrSetSignalHandlerStore) \
SymI_HasProto(gcdIntegerzh_fast) \
SymI_HasProto(gcdIntegerIntzh_fast) \
SymI_HasProto(gcdIntzh_fast) \
#include "ThreadLabels.h"
#include "BlockAlloc.h"
#include "Trace.h"
-#include "RtsTypeable.h"
+#include "RtsGlobals.h"
#include "Stable.h"
#include "Hpc.h"
#include "FileLock.h"
getStablePtr((StgPtr)blockedIndefinitely_closure);
/* initialise the shared Typeable store */
- initTypeableStore();
+ initGlobalStore();
/* initialise file locking, if necessary */
#if !defined(mingw32_HOST_OS)
freeScheduler();
/* free shared Typeable store */
- exitTypeableStore();
+ exitGlobalStore();
/* free file locking tables, if necessary */
#if !defined(mingw32_HOST_OS)
+++ /dev/null
-/* -----------------------------------------------------------------------------
- *
- * (c) The GHC Team, 1995-2005
- *
- * Data.Typeable support
- *
- * ---------------------------------------------------------------------------*/
-
-#include "Rts.h"
-#include "RtsTypeable.h"
-
-static StgPtr typeableStore = 0;
-#ifdef THREADED_RTS
-Mutex typeableStoreLock;
-#endif
-
-
-void
-initTypeableStore()
-{
- typeableStore=0;
-#ifdef THREADED_RTS
- initMutex(&typeableStoreLock);
-#endif
-}
-
-void
-exitTypeableStore()
-{
-#ifdef THREADED_RTS
- closeMutex(&typeableStoreLock);
-#endif
- if(typeableStore!=0) {
- freeStablePtr((StgStablePtr)typeableStore);
- typeableStore=0;
- }
-}
-
-StgPtr
-getOrSetTypeableStore(StgPtr ptr)
-{
- StgPtr ret = typeableStore;
- if(ret==0) {
-#ifdef THREADED_RTS
- ACQUIRE_LOCK(&typeableStoreLock);
- ret=typeableStore;
- if(ret==0) {
-#endif
- typeableStore = ret = ptr;
-#ifdef THREADED_RTS
- }
- RELEASE_LOCK(&typeableStoreLock);
-#endif
- }
- return ret;
-}