Merge branch 'master' of ssh://git.onelab.eu/git/sliver-openvswitch
[sliver-openvswitch.git] / lib / ovs-atomic-gcc4+.h
index 4476162..b465181 100644 (file)
@@ -150,6 +150,7 @@ int64_t locked_int64_and(struct locked_int64 *, int64_t arg);
 \f
 #define ATOMIC_VAR_INIT(VALUE) { .value = (VALUE) }
 #define atomic_init(OBJECT, VALUE) ((OBJECT)->value = (VALUE), (void) 0)
+#define atomic_destroy(OBJECT) ((void) (OBJECT))
 
 static inline void
 atomic_thread_fence(memory_order order)
@@ -238,6 +239,18 @@ typedef struct {
 } atomic_flag;
 #define ATOMIC_FLAG_INIT { false }
 
+static inline void
+atomic_flag_init(volatile atomic_flag *object OVS_UNUSED)
+{
+    /* Nothing to do. */
+}
+
+static inline void
+atomic_flag_destroy(volatile atomic_flag *object OVS_UNUSED)
+{
+    /* Nothing to do. */
+}
+
 static inline bool
 atomic_flag_test_and_set(volatile atomic_flag *object)
 {