[libcxx-commits] [PATCH] D109539: [NFC][libcxxabi] Rename GlobalLock to GlobalMutex

Daniel McIntosh via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Jan 12 14:29:29 PST 2022


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGe42eeb88d7b2: [NFC][libcxxabi] Rename GlobalLock to GlobalMutex (authored by DanielMcIntosh-IBM).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D109539/new/

https://reviews.llvm.org/D109539

Files:
  libcxxabi/src/cxa_guard_impl.h
  libcxxabi/test/guard_test_basic.pass.cpp
  libcxxabi/test/guard_threaded_test.pass.cpp


Index: libcxxabi/test/guard_threaded_test.pass.cpp
===================================================================
--- libcxxabi/test/guard_threaded_test.pass.cpp
+++ libcxxabi/test/guard_threaded_test.pass.cpp
@@ -326,7 +326,7 @@
   }
 
 void test_all_impls() {
-  using MutexImpl = SelectImplementation<Implementation::GlobalLock>::type;
+  using MutexImpl = SelectImplementation<Implementation::GlobalMutex>::type;
 
   // Attempt to test the Futex based implementation if it's supported on the
   // target platform.
Index: libcxxabi/test/guard_test_basic.pass.cpp
===================================================================
--- libcxxabi/test/guard_test_basic.pass.cpp
+++ libcxxabi/test/guard_test_basic.pass.cpp
@@ -121,7 +121,7 @@
     static_assert(
         std::is_same<SelectedImplementation, InitByteNoThreads>::value, "");
 #else
-    static_assert(CurrentImplementation == Implementation::GlobalLock, "");
+    static_assert(CurrentImplementation == Implementation::GlobalMutex, "");
     static_assert(
         std::is_same<
             SelectedImplementation,
Index: libcxxabi/src/cxa_guard_impl.h
===================================================================
--- libcxxabi/src/cxa_guard_impl.h
+++ libcxxabi/src/cxa_guard_impl.h
@@ -510,7 +510,7 @@
 template <class T>
 _LIBCPP_SAFE_STATIC T GlobalStatic<T>::instance = {};
 
-enum class Implementation { NoThreads, GlobalLock, Futex };
+enum class Implementation { NoThreads, GlobalMutex, Futex };
 
 template <Implementation Impl>
 struct SelectImplementation;
@@ -521,7 +521,7 @@
 };
 
 template <>
-struct SelectImplementation<Implementation::GlobalLock> {
+struct SelectImplementation<Implementation::GlobalMutex> {
   using type = InitByteGlobalMutex<LibcppMutex, LibcppCondVar, GlobalStatic<LibcppMutex>::instance,
                                    GlobalStatic<LibcppCondVar>::instance, PlatformThreadID>;
 };
@@ -539,7 +539,7 @@
 #elif defined(_LIBCXXABI_USE_FUTEX)
     Implementation::Futex;
 #else
-    Implementation::GlobalLock;
+    Implementation::GlobalMutex;
 #endif
 
 static_assert(CurrentImplementation != Implementation::Futex || PlatformSupportsFutex(),


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D109539.399469.patch
Type: text/x-patch
Size: 2167 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220112/8c3cf93b/attachment.bin>


More information about the libcxx-commits mailing list