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

Daniel McIntosh via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Sep 13 12:35:07 PDT 2021


DanielMcIntosh-IBM updated this revision to Diff 372322.
DanielMcIntosh-IBM added a comment.

Update description with a bit more detail


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
@@ -508,7 +508,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;
@@ -519,7 +519,7 @@
 };
 
 template <>
-struct SelectImplementation<Implementation::GlobalLock> {
+struct SelectImplementation<Implementation::GlobalMutex> {
   using type = InitByteGlobalMutex<LibcppMutex, LibcppCondVar, GlobalStatic<LibcppMutex>::instance,
                                    GlobalStatic<LibcppCondVar>::instance, PlatformThreadID>;
 };
@@ -537,7 +537,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.372322.patch
Type: text/x-patch
Size: 2167 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210913/55cf0556/attachment.bin>


More information about the libcxx-commits mailing list