128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
|
void *_Nullable o, void *_Nullable n)
{
return __atomic_compare_exchange(p, &o, &n, false,
__ATOMIC_RELAXED, __ATOMIC_RELAXED);
}
static OF_INLINE void
of_memory_barrier_full(void)
{
__atomic_thread_fence(__ATOMIC_SEQ_CST);
}
static OF_INLINE void
of_memory_barrier_acquire(void)
{
__atomic_thread_fence(__ATOMIC_ACQUIRE);
}
static OF_INLINE void
of_memory_barrier_release(void)
{
__atomic_thread_fence(__ATOMIC_RELEASE);
}
|
|
|
|
|
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
|
void *_Nullable o, void *_Nullable n)
{
return __atomic_compare_exchange(p, &o, &n, false,
__ATOMIC_RELAXED, __ATOMIC_RELAXED);
}
static OF_INLINE void
OFMemoryBarrier(void)
{
__atomic_thread_fence(__ATOMIC_SEQ_CST);
}
static OF_INLINE void
OFAcquireMemoryBarrier(void)
{
__atomic_thread_fence(__ATOMIC_ACQUIRE);
}
static OF_INLINE void
OFReleaseMemoryBarrier(void)
{
__atomic_thread_fence(__ATOMIC_RELEASE);
}
|