Skip to content
Snippets Groups Projects

Implement atomic_compare_exchange_strong in the atomic compat headers

Merged Martin Storsjö requested to merge mstorsjo/dav1d:atomic-compare-exchange into master
2 files
+ 10
0
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -44,6 +44,7 @@ typedef unsigned int atomic_uint;
#define atomic_fetch_sub(p_a, dec) __atomic_fetch_sub(p_a, dec, __ATOMIC_SEQ_CST)
#define atomic_exchange(p_a, v) __atomic_exchange_n(p_a, v, __ATOMIC_SEQ_CST)
#define atomic_fetch_or(p_a, v) __atomic_fetch_or(p_a, v, __ATOMIC_SEQ_CST)
#define atomic_compare_exchange_strong(p_a, expected, desired) __atomic_compare_exchange_n(p_a, expected, desired, 0, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST)
#endif /* !defined(__cplusplus) */
Loading