Skip to content
This repository has been archived by the owner on Apr 13, 2019. It is now read-only.

Commit

Permalink
Use WRITE_ONCE in atomic
Browse files Browse the repository at this point in the history
  • Loading branch information
palmer-dabbelt committed May 30, 2017
1 parent c43c599 commit 77647f9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion arch/riscv/include/asm/atomic.h
Expand Up @@ -38,7 +38,7 @@ static inline int atomic_read(const atomic_t *v)
*/
static inline void atomic_set(atomic_t *v, int i)
{
v->counter = i;
WRITE_ONCE(v->counter, i);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion arch/riscv/include/asm/atomic64.h
Expand Up @@ -39,7 +39,7 @@ static inline s64 atomic64_read(const atomic64_t *v)
*/
static inline void atomic64_set(atomic64_t *v, s64 i)
{
v->counter = i;
WRITE_ONCE(v->counter, i);
}

/**
Expand Down

0 comments on commit 77647f9

Please sign in to comment.