[NFC][libcxxabi] Rename GlobalLock to GlobalMutex

This will make the naming more consistent with what it's called in the
rest of the file.

This is the 1st of 5 changes to overhaul cxa_guard.
See D108343 for what the final result will be.

Reviewed By: ldionne, #libc_abi

Differential Revision: https://reviews.llvm.org/D109539
This commit is contained in:
Daniel McIntosh 2021-08-11 10:47:48 -04:00
parent ba6a3972d7
commit e42eeb88d7
3 changed files with 5 additions and 5 deletions

View File

@ -510,7 +510,7 @@ struct GlobalStatic {
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 @@ struct SelectImplementation<Implementation::NoThreads> {
};
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 @@ constexpr Implementation CurrentImplementation =
#elif defined(_LIBCXXABI_USE_FUTEX)
Implementation::Futex;
#else
Implementation::GlobalLock;
Implementation::GlobalMutex;
#endif
static_assert(CurrentImplementation != Implementation::Futex || PlatformSupportsFutex(),

View File

@ -121,7 +121,7 @@ int main(int, char**) {
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,

View File

@ -326,7 +326,7 @@ void test_impl() {
}
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.