[libcxx-commits] [PATCH] D109539: [NFC][libcxxabi] Rename GlobalLock to GlobalMutex
Daniel McIntosh via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Sep 9 13:13:43 PDT 2021
DanielMcIntosh-IBM created this revision.
DanielMcIntosh-IBM added reviewers: ldionne, EricWF, zibi.
DanielMcIntosh-IBM requested review of this revision.
Herald added a project: libc++abi.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++abi.
This is the first of 5 changes to overhaul cxa_guard.
See D108343 <https://reviews.llvm.org/D108343> for what the final result will be, and more details on why
cxa_guard is getting overhauled.
Repository:
rG LLVM Github Monorepo
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.371703.patch
Type: text/x-patch
Size: 2167 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210909/32860f5f/attachment.bin>
More information about the libcxx-commits
mailing list