tests: Expand 'bundle with many ports' test.
[cascardo/ovs.git] / lib / ovs-atomic-clang.h
index c169f37..34cc2fa 100644 (file)
 #define OVS_ATOMIC_CLANG_IMPL 1
 
 #define ATOMIC(TYPE) _Atomic(TYPE)
-#include "ovs-atomic-types.h"
 
 #define ATOMIC_VAR_INIT(VALUE) (VALUE)
 
 #define atomic_init(OBJECT, VALUE) __c11_atomic_init(OBJECT, VALUE)
-#define atomic_destroy(OBJECT) ((void) (OBJECT))
 
 /* Clang hard-codes these exact values internally but does not appear to
  * export any names for them. */
@@ -55,6 +53,20 @@ typedef enum {
     (*(DST) = __c11_atomic_load(SRC, ORDER), \
      (void) 0)
 
+#define atomic_compare_exchange_strong(DST, EXP, SRC)                   \
+    atomic_compare_exchange_strong_explicit(DST, EXP, SRC,              \
+                                            memory_order_seq_cst,       \
+                                            memory_order_seq_cst)
+#define atomic_compare_exchange_strong_explicit(DST, EXP, SRC, ORD1, ORD2) \
+    __c11_atomic_compare_exchange_strong(DST, EXP, SRC, ORD1, ORD2)
+
+#define atomic_compare_exchange_weak(DST, EXP, SRC)              \
+    atomic_compare_exchange_weak_explicit(DST, EXP, SRC,         \
+                                          memory_order_seq_cst,  \
+                                          memory_order_seq_cst)
+#define atomic_compare_exchange_weak_explicit(DST, EXP, SRC, ORD1, ORD2) \
+    __c11_atomic_compare_exchange_weak(DST, EXP, SRC, ORD1, ORD2)
+
 #define atomic_add(RMW, ARG, ORIG) \
     atomic_add_explicit(RMW, ARG, ORIG, memory_order_seq_cst)
 #define atomic_sub(RMW, ARG, ORIG) \