[ovs-dev] [PATCH 05/18] lib: Use shorter form of relaxed atomic access.

Jarno Rajahalme jrajahalme at nicira.com
Fri Aug 22 20:58:16 UTC 2014


Signed-off-by: Jarno Rajahalme <jrajahalme at nicira.com>
---
 lib/dpif-netdev.c |    4 ++--
 lib/ovs-thread.h  |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
index 7401293..17da3dd 100644
--- a/lib/dpif-netdev.c
+++ b/lib/dpif-netdev.c
@@ -617,7 +617,7 @@ dp_netdev_reload_pmd_threads(struct dp_netdev *dp)
         struct pmd_thread *f = &dp->pmd_threads[i];
         int old_seq;
 
-        atomic_add_explicit(&f->change_seq, 1, &old_seq, memory_order_relaxed);
+        atomic_add_relaxed(&f->change_seq, 1, &old_seq);
     }
 }
 
@@ -1728,7 +1728,7 @@ reload:
 
             ovsrcu_quiesce();
 
-            atomic_read_explicit(&f->change_seq, &seq, memory_order_relaxed);
+            atomic_read_relaxed(&f->change_seq, &seq);
             if (seq != port_seq) {
                 port_seq = seq;
                 break;
diff --git a/lib/ovs-thread.h b/lib/ovs-thread.h
index 349c772..b2ac56e 100644
--- a/lib/ovs-thread.h
+++ b/lib/ovs-thread.h
@@ -556,7 +556,7 @@ ovsthread_once_is_done__(struct ovsthread_once *once)
 {
     bool done;
 
-    atomic_read_explicit(&once->done, &done, memory_order_relaxed);
+    atomic_read_relaxed(&once->done, &done);
     return done;
 }
 
-- 
1.7.10.4




More information about the dev mailing list