[*] Clang build fix
This commit is contained in:
parent
9dcb7ca673
commit
779e884caf
@ -432,7 +432,8 @@ inline auline T AuAtomicUtils<T>::Load(T *in)
|
|||||||
{
|
{
|
||||||
return (T)AuAtomicUtils<AuUInt>::Load((AuUInt *)in);
|
return (T)AuAtomicUtils<AuUInt>::Load((AuUInt *)in);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
#if defined(AURORA_COMPILER_MSVC) && (defined(AURORA_ARCH_X64) || defined(AURORA_ARCH_X86))
|
#if defined(AURORA_COMPILER_MSVC) && (defined(AURORA_ARCH_X64) || defined(AURORA_ARCH_X86))
|
||||||
const auto read = *in;
|
const auto read = *in;
|
||||||
::_ReadWriteBarrier();
|
::_ReadWriteBarrier();
|
||||||
@ -477,7 +478,7 @@ inline auline T AuAtomicUtils<T>::Load(T *in)
|
|||||||
else if constexpr (AuIsSame_v<AuInt64, T>)
|
else if constexpr (AuIsSame_v<AuInt64, T>)
|
||||||
{
|
{
|
||||||
return ATOMIC_PREFIX_HAX(atomic_load)((_Atomic(AuInt64) *)(in), __ATOMIC_ACQUIRE);
|
return ATOMIC_PREFIX_HAX(atomic_load)((_Atomic(AuInt64) *)(in), __ATOMIC_ACQUIRE);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
static_assert(AuIsVoid_v<T>, "T");
|
static_assert(AuIsVoid_v<T>, "T");
|
||||||
@ -486,6 +487,7 @@ inline auline T AuAtomicUtils<T>::Load(T *in)
|
|||||||
return __sync_val_compare_and_swap(*in, 0, 0);
|
return __sync_val_compare_and_swap(*in, 0, 0);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
@ -496,7 +498,8 @@ inline auline void AuAtomicUtils<T>::Store(T *in, T val)
|
|||||||
AuAtomicUtils<AuUInt>::Store((AuUInt *)in, (AuUInt)val);
|
AuAtomicUtils<AuUInt>::Store((AuUInt *)in, (AuUInt)val);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
#if defined(AURORA_COMPILER_MSVC) && (defined(AURORA_ARCH_X64) || defined(AURORA_ARCH_X86))
|
#if defined(AURORA_COMPILER_MSVC) && (defined(AURORA_ARCH_X64) || defined(AURORA_ARCH_X86))
|
||||||
*in = val;
|
*in = val;
|
||||||
#elif defined(AURORA_COMPILER_MSVC)
|
#elif defined(AURORA_COMPILER_MSVC)
|
||||||
@ -582,6 +585,7 @@ inline auline void AuAtomicUtils<T>::Store(T *in, T val)
|
|||||||
__sync_synchronize();
|
__sync_synchronize();
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
|
Loading…
Reference in New Issue
Block a user