add getOrSetSignalHandlerStore, much like getOrSetTypeableStore
[ghc-hetmet.git] / rts / Typeable.c
diff --git a/rts/Typeable.c b/rts/Typeable.c
deleted file mode 100644 (file)
index 88151b7..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-/* -----------------------------------------------------------------------------
- *
- * (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;
-}