diff options
| author | Simon Marlow <simonmar@microsoft.com> | 2006-10-19 14:12:18 +0000 |
|---|---|---|
| committer | Simon Marlow <simonmar@microsoft.com> | 2006-10-19 14:12:18 +0000 |
| commit | 53c390a4f2eb9017d50f51cd040f742cef309fb9 (patch) | |
| tree | a3746eb23cf339c6c5c6f519d7147bddd60e82c1 | |
| parent | 59c03ecb7fa69bf13647f0106e50748e90711176 (diff) | |
| download | haskell-53c390a4f2eb9017d50f51cd040f742cef309fb9.tar.gz | |
remove ^Ms
| -rw-r--r-- | rts/Typeable.c | 92 |
1 files changed, 46 insertions, 46 deletions
diff --git a/rts/Typeable.c b/rts/Typeable.c index 4c4d460d66..1d7edd1c94 100644 --- a/rts/Typeable.c +++ b/rts/Typeable.c @@ -1,48 +1,48 @@ #include "RtsTypeable.h" #include "Rts.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;
-}
+ +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; +} |
