@@ -701,7 +701,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
701
701
template <class _ValueType >
702
702
inline _LIBCPP_INLINE_VISIBILITY
703
703
_ValueType __libcpp_relaxed_load (_ValueType const * __value) {
704
- #if ! defined(_LIBCPP_HAS_NO_THREADS ) && \
704
+ #if defined(_LIBCPP_SGX_HAS_CXX_ATOMIC ) && \
705
705
defined (__ATOMIC_RELAXED) && \
706
706
(__has_builtin (__atomic_load_n) || defined (_LIBCPP_COMPILER_GCC))
707
707
return __atomic_load_n (__value, __ATOMIC_RELAXED);
@@ -713,7 +713,7 @@ _ValueType __libcpp_relaxed_load(_ValueType const* __value) {
713
713
template <class _ValueType >
714
714
inline _LIBCPP_INLINE_VISIBILITY
715
715
_ValueType __libcpp_acquire_load (_ValueType const * __value) {
716
- #if ! defined(_LIBCPP_HAS_NO_THREADS ) && \
716
+ #if defined(_LIBCPP_SGX_HAS_CXX_ATOMIC ) && \
717
717
defined (__ATOMIC_ACQUIRE) && \
718
718
(__has_builtin (__atomic_load_n) || defined (_LIBCPP_COMPILER_GCC))
719
719
return __atomic_load_n (__value, __ATOMIC_ACQUIRE);
@@ -2452,7 +2452,7 @@ template <class _Tp>
2452
2452
inline _LIBCPP_INLINE_VISIBILITY _Tp
2453
2453
__libcpp_atomic_refcount_increment (_Tp& __t ) _NOEXCEPT
2454
2454
{
2455
- #if defined(_LIBCPP_HAS_BUILTIN_ATOMIC_SUPPORT) && !defined(_LIBCPP_HAS_NO_THREADS )
2455
+ #if defined(_LIBCPP_SGX_HAS_CXX_ATOMIC )
2456
2456
return __atomic_add_fetch (&__t , 1 , __ATOMIC_RELAXED);
2457
2457
#else
2458
2458
return __t += 1 ;
@@ -2463,7 +2463,7 @@ template <class _Tp>
2463
2463
inline _LIBCPP_INLINE_VISIBILITY _Tp
2464
2464
__libcpp_atomic_refcount_decrement (_Tp& __t ) _NOEXCEPT
2465
2465
{
2466
- #if defined(_LIBCPP_HAS_BUILTIN_ATOMIC_SUPPORT) && !defined(_LIBCPP_HAS_NO_THREADS )
2466
+ #if defined(_LIBCPP_SGX_HAS_CXX_ATOMIC )
2467
2467
return __atomic_add_fetch (&__t , -1 , __ATOMIC_ACQ_REL);
2468
2468
#else
2469
2469
return __t -= 1 ;
0 commit comments