]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Added atomic_compare_exchange_strong_acq_rel macro
authorDiego Fronza <diego@isc.org>
Tue, 11 Feb 2020 20:21:13 +0000 (17:21 -0300)
committerDiego Fronza <diego@isc.org>
Fri, 14 Feb 2020 14:41:36 +0000 (11:41 -0300)
It is much better to read than:
atomic_compare_exchange_strong_explicit() with 5 arguments.

lib/isc/include/isc/atomic.h

index 809ee3e42594e5d335502ef0d27a07848e5bf096..7a1bc8c38f39c58a6a5678d53bdd70fb38e0c560 100644 (file)
@@ -46,6 +46,9 @@
 #define atomic_compare_exchange_strong_relaxed(o, e, d) \
        atomic_compare_exchange_strong_explicit(        \
                (o), (e), (d), memory_order_relaxed, memory_order_relaxed)
+#define atomic_compare_exchange_strong_acq_rel(o, e, d)        \
+       atomic_compare_exchange_strong_explicit(        \
+               (o), (e), (d), memory_order_acq_rel, memory_order_acquire)
 
 /* Acquire-Release Memory Ordering */