host stack: update stale copyright
[vpp.git] / src / svm / svm_fifo.h
index d7146ae..4a11934 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Cisco and/or its affiliates.
+ * Copyright (c) 2016-2019 Cisco and/or its affiliates.
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at:
@@ -173,18 +173,18 @@ svm_fifo_set_event (svm_fifo_t * f)
 {
   /* return __sync_lock_test_and_set (&f->has_event, 1) == 0;
      return __sync_bool_compare_and_swap (&f->has_event, 0, 1); */
-  return !__atomic_exchange_n (&f->has_event, 1, __ATOMIC_RELEASE);
+  return !clib_atomic_swap_rel_n (&f->has_event, 1);
 }
 
 /**
  * Unsets fifo event flag.
  *
- * Also acts as a release barrier.
+ * Also acts as an acquire barrier.
  */
 always_inline void
 svm_fifo_unset_event (svm_fifo_t * f)
 {
-  clib_atomic_release (&f->has_event);
+  clib_atomic_swap_acq_n (&f->has_event, 0);
 }
 
 svm_fifo_t *svm_fifo_create (u32 data_size_in_bytes);