Skip to content

Commit e42eeb8

Browse files
[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
1 parent ba6a397 commit e42eeb8

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

libcxxabi/src/cxa_guard_impl.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ struct GlobalStatic {
510510
template <class T>
511511
_LIBCPP_SAFE_STATIC T GlobalStatic<T>::instance = {};
512512

513-
enum class Implementation { NoThreads, GlobalLock, Futex };
513+
enum class Implementation { NoThreads, GlobalMutex, Futex };
514514

515515
template <Implementation Impl>
516516
struct SelectImplementation;
@@ -521,7 +521,7 @@ struct SelectImplementation<Implementation::NoThreads> {
521521
};
522522

523523
template <>
524-
struct SelectImplementation<Implementation::GlobalLock> {
524+
struct SelectImplementation<Implementation::GlobalMutex> {
525525
using type = InitByteGlobalMutex<LibcppMutex, LibcppCondVar, GlobalStatic<LibcppMutex>::instance,
526526
GlobalStatic<LibcppCondVar>::instance, PlatformThreadID>;
527527
};
@@ -539,7 +539,7 @@ constexpr Implementation CurrentImplementation =
539539
#elif defined(_LIBCXXABI_USE_FUTEX)
540540
Implementation::Futex;
541541
#else
542-
Implementation::GlobalLock;
542+
Implementation::GlobalMutex;
543543
#endif
544544

545545
static_assert(CurrentImplementation != Implementation::Futex || PlatformSupportsFutex(),

libcxxabi/test/guard_test_basic.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ int main(int, char**) {
121121
static_assert(
122122
std::is_same<SelectedImplementation, InitByteNoThreads>::value, "");
123123
#else
124-
static_assert(CurrentImplementation == Implementation::GlobalLock, "");
124+
static_assert(CurrentImplementation == Implementation::GlobalMutex, "");
125125
static_assert(
126126
std::is_same<
127127
SelectedImplementation,

libcxxabi/test/guard_threaded_test.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ void test_impl() {
326326
}
327327

328328
void test_all_impls() {
329-
using MutexImpl = SelectImplementation<Implementation::GlobalLock>::type;
329+
using MutexImpl = SelectImplementation<Implementation::GlobalMutex>::type;
330330

331331
// Attempt to test the Futex based implementation if it's supported on the
332332
// target platform.

0 commit comments

Comments
 (0)