diff options
author | Benoit Foucher <benoit@zeroc.com> | 2008-06-06 11:39:41 +0200 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2008-06-06 11:39:41 +0200 |
commit | 966061fcb0e2ec4d5d7ed9c6c280eefb27209da7 (patch) | |
tree | 078246631fb864d9e908108d69917b18c6303c16 /cppe/src/IceE/StaticMutex.cpp | |
parent | Removed SL code (diff) | |
download | ice-966061fcb0e2ec4d5d7ed9c6c280eefb27209da7.tar.bz2 ice-966061fcb0e2ec4d5d7ed9c6c280eefb27209da7.tar.xz ice-966061fcb0e2ec4d5d7ed9c6c280eefb27209da7.zip |
Removed Ice-E
Diffstat (limited to 'cppe/src/IceE/StaticMutex.cpp')
-rw-r--r-- | cppe/src/IceE/StaticMutex.cpp | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/cppe/src/IceE/StaticMutex.cpp b/cppe/src/IceE/StaticMutex.cpp deleted file mode 100644 index 334ea1ae99d..00000000000 --- a/cppe/src/IceE/StaticMutex.cpp +++ /dev/null @@ -1,42 +0,0 @@ -// ********************************************************************** -// -// Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. -// -// This copy of Ice-E is licensed to you under the terms described in the -// ICEE_LICENSE file included in this distribution. -// -// ********************************************************************** - -#include <IceE/StaticMutex.h> - -#ifdef _WIN32 -void IceUtil::StaticMutex::initialize() const -{ - // - // First we create the new critical section - // - CRITICAL_SECTION* newCriticalSection = new CRITICAL_SECTION; - InitializeCriticalSection(newCriticalSection); - - // - // Then assign it to _mutex - // Note that Windows performs a full memory barrier before the assignment; - // this ensures we write the initialized critical section before we write _mutex. - // - if(InterlockedCompareExchangePointer(reinterpret_cast<void**>(&_mutex), newCriticalSection, 0) != 0) - { - // - // Another thread was doing the same thing - // - DeleteCriticalSection(newCriticalSection); - delete newCriticalSection; - } - - // - // This implementation does not attempt to clean up the initialized and assigned critical sections: - // they leak - // -} -#endif - -IceUtil::StaticMutex IceUtil::globalMutex = ICE_STATIC_MUTEX_INITIALIZER; |