]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/common/servnotf.cpp
ICU-62135.0.1.tar.gz
[apple/icu.git] / icuSources / common / servnotf.cpp
index 6adf52ece2eeffbdd048fccacb746d92f854ece4..dc77c7b857d290288ffe6b89bf74ab701567895d 100644 (file)
@@ -1,6 +1,8 @@
+// © 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
 /**
  *******************************************************************************
- * Copyright (C) 2001-2006, International Business Machines Corporation and    *
+ * Copyright (C) 2001-2012, International Business Machines Corporation and    *
  * others. All Rights Reserved.                                                *
  *******************************************************************************
  */
@@ -19,10 +21,11 @@ U_NAMESPACE_BEGIN
 EventListener::~EventListener() {}
 UOBJECT_DEFINE_RTTI_IMPLEMENTATION(EventListener)
 
+static UMutex notifyLock = U_MUTEX_INITIALIZER;
+
 ICUNotifier::ICUNotifier(void) 
-: notifyLock(0), listeners(NULL) 
+: listeners(NULL) 
 {
-    umtx_init(&notifyLock);
 }
 
 ICUNotifier::~ICUNotifier(void) {
@@ -31,7 +34,6 @@ ICUNotifier::~ICUNotifier(void) {
         delete listeners;
         listeners = NULL;
     }
-    umtx_destroy(&notifyLock);
 }