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;
};
template <>
-struct SelectImplementation<Implementation::GlobalLock> {
+struct SelectImplementation<Implementation::GlobalMutex> {
using type = InitByteGlobalMutex<LibcppMutex, LibcppCondVar, GlobalStatic<LibcppMutex>::instance,
GlobalStatic<LibcppCondVar>::instance, PlatformThreadID>;
};
#elif defined(_LIBCXXABI_USE_FUTEX)
Implementation::Futex;
#else
- Implementation::GlobalLock;
+ Implementation::GlobalMutex;
#endif
static_assert(CurrentImplementation != Implementation::Futex || PlatformSupportsFutex(),
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,
}
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.