Skip to content

Commit

Permalink
lib: Use shorter form of relaxed atomic access.
Browse files Browse the repository at this point in the history
Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
  • Loading branch information
Jarno Rajahalme committed Aug 29, 2014
1 parent a36cd3f commit 91a9637
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/dpif-netdev.c
Expand Up @@ -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);
}
}

Expand Down Expand Up @@ -1732,7 +1732,7 @@ pmd_thread_main(void *f_)

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;
Expand Down
2 changes: 1 addition & 1 deletion lib/ovs-thread.h
Expand Up @@ -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;
}

Expand Down

0 comments on commit 91a9637

Please sign in to comment.