]> granicus.if.org Git - icu/commitdiff
ICU-20185 Remove U_USER_ATOMICS_H, U_USER_MUTEX_H, U_USER_MUTEX_CPP
authorAndy Heninger <andy.heninger@gmail.com>
Wed, 31 Oct 2018 21:30:58 +0000 (14:30 -0700)
committerAndy Heninger <andy.heninger@gmail.com>
Tue, 13 Nov 2018 22:48:48 +0000 (14:48 -0800)
icu4c/source/common/umutex.cpp
icu4c/source/common/umutex.h

index 9d4fda16d7b3d5118c8d7e85299566e999b7c426..b4671e3b5562626088acefa24f6a814a60e3c7d7 100644 (file)
@@ -36,11 +36,12 @@ static UMutex   globalMutex = U_MUTEX_INITIALIZER;
  */
 
 #if defined(U_USER_MUTEX_CPP)
-// Build time user mutex hook: #include "U_USER_MUTEX_CPP"
-#include U_MUTEX_XSTR(U_USER_MUTEX_CPP)
-
+// Support for including an alternate implementation of mutexes has been withdrawn.
+// See issue ICU-20185.
+#error U_USER_MUTEX_CPP not supported
+#endif
 
-#elif U_HAVE_STD_MUTEX
+#if U_HAVE_STD_MUTEX
 
 // C++11 std::mutex based implementation of ICU mutex wrappers.
 //
index 86a2480873c9814e9f9948fb3481dc66bf4dc96c..94166630ce45c21c86550d49b512cbcfcf8b33bf 100644 (file)
@@ -35,24 +35,19 @@ U_NAMESPACE_BEGIN
 struct UInitOnce;
 U_NAMESPACE_END
 
-// Stringify macros, to allow #include of user supplied atomic & mutex files.
-#define U_MUTEX_STR(s) #s
-#define U_MUTEX_XSTR(s) U_MUTEX_STR(s)
-
 /****************************************************************************
  *
  *   Low Level Atomic Operations.
  *      Compiler dependent. Not operating system dependent.
  *
  ****************************************************************************/
-#if defined (U_USER_ATOMICS_H)
-#include U_MUTEX_XSTR(U_USER_ATOMICS_H)
-
-// TODO: There is direct use of std::atomic<type *> from number__mapper, numberrangeformatter
-//       Either add ICU abstraction, or deprecate U_USER_ATOMICS_H.
-//       See Jira issu ICU-20185.
+#if defined(U_USER_ATOMICS_H)
+// Support for including an alternate implementation of atomic operations has been withdrawn.
+// See issue ICU-20185.
+#error U_USER_ATOMICS not supported
+#endif
 
-#elif U_HAVE_STD_ATOMICS
+#if U_HAVE_STD_ATOMICS
 
 //  C++11 atomics are available.
 
@@ -336,10 +331,12 @@ U_NAMESPACE_END
  *************************************************************************************************/
 
 #if defined(U_USER_MUTEX_H)
-// #include "U_USER_MUTEX_H"
-#include U_MUTEX_XSTR(U_USER_MUTEX_H)
+// Support for including an alternate implementation of mutexes has been withdrawn.
+// See issue ICU-20185.
+#error U_USER_MUTEX_H not supported
+#endif
 
-#elif U_HAVE_STD_MUTEX
+#if U_HAVE_STD_MUTEX
 
 #include <mutex>
 #include <condition_variable>