8#if PLATFORM_CPU_X86_FAMILY
12#if !defined(TRACE_PRIVATE_THREAD_YIELD)
13# define TRACE_PRIVATE_THREAD_YIELD 0
41#if TRACE_PRIVATE_THREAD_YIELD
44#elif PLATFORM_USE_SSE2_FOR_THREAD_YIELD
46#elif PLATFORM_CPU_ARM_FAMILY
47# if defined(_MSC_VER) && !defined(__clang__)
53 #error Unsupported architecture!
58template <
typename Type>
61 std::atomic<Type>* T = (std::atomic<Type>*) Source;
62 return T->load(std::memory_order_relaxed);
66template <
typename Type>
69 std::atomic<Type>* T = (std::atomic<Type>*) Source;
70 return T->load(std::memory_order_acquire);
74template <
typename Type>
77 std::atomic<Type>* T = (std::atomic<Type>*) Target;
78 T->store(
Value, std::memory_order_relaxed);
82template <
typename Type>
85 std::atomic<Type>* T = (std::atomic<Type>*) Target;
86 T->store(
Value, std::memory_order_release);
90template <
typename Type>
93 std::atomic<Type>* T = (std::atomic<Type>*) Target;
94 return T->exchange(
Value, std::memory_order_acquire);
98template <
typename Type>
101 std::atomic<Type>* T = (std::atomic<Type>*) Target;
102 return T->exchange(
Value, std::memory_order_release);
106template <
typename Type>
109 std::atomic<Type>* T = (std::atomic<Type>*) Target;
110 return T->compare_exchange_weak(Expected,
New, std::memory_order_relaxed);
114template <
typename Type>
117 std::atomic<Type>* T = (std::atomic<Type>*) Target;
118 return T->compare_exchange_weak(Expected,
New, std::memory_order_acquire);
122template <
typename Type>
125 std::atomic<Type>* T = (std::atomic<Type>*) Target;
126 return T->compare_exchange_weak(Expected,
New, std::memory_order_release);
130template <
typename Type>
133 std::atomic<Type>* T = (std::atomic<Type>*) Target;
134 return T->fetch_add(
Value, std::memory_order_relaxed);
138template <
typename Type>
141 std::atomic<Type>* T = (std::atomic<Type>*) Target;
142 return T->fetch_add(
Value, std::memory_order_acquire);
146template <
typename Type>
149 std::atomic<Type>* T = (std::atomic<Type>*) Target;
150 return T->fetch_add(
Value, std::memory_order_release);
154template <
typename Type>
157 std::atomic<Type>* T = (std::atomic<Type>*) Target;
158 return T->fetch_sub(
Value, std::memory_order_relaxed);
162template <
typename Type>
165 std::atomic<Type>* T = (std::atomic<Type>*) Target;
166 return T->fetch_sub(
Value, std::memory_order_acquire);
170template <
typename Type>
173 std::atomic<Type>* T = (std::atomic<Type>*) Target;
174 return T->fetch_sub(
Value, std::memory_order_release);
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
T * New(FMemStackBase &Mem, int32 Count=1, int32 Align=DEFAULT_ALIGNMENT)
Definition MemStack.h:259
Definition OverriddenPropertySet.cpp:45
bool AtomicCompareExchangeAcquire(Type volatile *Target, Type New, Type Expected)
Definition Atomic.h:115
void AtomicStoreRelaxed(Type volatile *Target, Type Value)
Definition Atomic.h:75
void AtomicStoreRelease(Type volatile *Target, Type Value)
Definition Atomic.h:83
Type AtomicExchangeRelease(Type volatile *Target, Type Value)
Definition Atomic.h:99
Type AtomicAddRelaxed(Type volatile *Target, Type Value)
Definition Atomic.h:131
Type AtomicAddAcquire(Type volatile *Target, Type Value)
Definition Atomic.h:139
Type AtomicExchangeAcquire(Type volatile *Target, Type Value)
Definition Atomic.h:91
Type AtomicSubAcquire(Type volatile *Target, Type Value)
Definition Atomic.h:163
bool AtomicCompareExchangeRelaxed(Type volatile *Target, Type New, Type Expected)
Definition Atomic.h:107
Type AtomicLoadRelaxed(Type volatile *Source)
Definition Atomic.h:59
Type AtomicSubRelaxed(Type volatile *Target, Type Value)
Definition Atomic.h:155
Type AtomicLoadAcquire(Type volatile *Source)
Definition Atomic.h:67
bool AtomicCompareExchangeRelease(Type volatile *Target, Type New, Type Expected)
Definition Atomic.h:123
Type AtomicSubRelease(Type volatile *Target, Type Value)
Definition Atomic.h:171
void PlatformYield()
Definition Atomic.h:39
Type AtomicAddRelease(Type volatile *Target, Type Value)
Definition Atomic.h:147
Definition AdvancedWidgetsModule.cpp:13