]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/common/serv.cpp
ICU-511.32.tar.gz
[apple/icu.git] / icuSources / common / serv.cpp
index 2cddcfe65dcdcf3d4b266d273c111b26fb6e4df8..1a8c9166e043b124b2d753d79f393701fee61533 100644 (file)
@@ -1,6 +1,6 @@
 /**
 *******************************************************************************
 /**
 *******************************************************************************
-* Copyright (C) 2001-2011, International Business Machines Corporation.
+* Copyright (C) 2001-2012, International Business Machines Corporation.
 * All Rights Reserved.
 *******************************************************************************
 */
 * All Rights Reserved.
 *******************************************************************************
 */
@@ -331,7 +331,7 @@ U_CDECL_END
 ******************************************************************
 */
 
 ******************************************************************
 */
 
-static UMTX lock;
+static UMutex lock = U_MUTEX_INITIALIZER;
 
 ICUService::ICUService()
 : name()
 
 ICUService::ICUService()
 : name()
@@ -401,7 +401,7 @@ ICUService::getKey(ICUServiceKey& key, UnicodeString* actualReturn, UErrorCode&
 // reentrantly even without knowing the thread.
 class XMutex : public UMemory {
 public:
 // reentrantly even without knowing the thread.
 class XMutex : public UMemory {
 public:
-    inline XMutex(UMTX *mutex, UBool reentering) 
+    inline XMutex(UMutex *mutex, UBool reentering) 
         : fMutex(mutex)
         , fActive(!reentering) 
     {
         : fMutex(mutex)
         , fActive(!reentering) 
     {
@@ -412,7 +412,7 @@ public:
     }
 
 private:
     }
 
 private:
-    UMTX  *fMutex;
+    UMutex  *fMutex;
     UBool fActive;
 };
 
     UBool fActive;
 };