diff options
author | Rich Felker <dalias@aerifal.cx> | 2014-07-19 18:34:10 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2014-07-28 00:28:01 -0400 |
commit | 1b61e4cab919c39af4462ee2fbccc9e07a59aac0 (patch) | |
tree | d77f361a90e2f568a7a49340031be573bf14baff /arch/powerpc/atomic.h | |
parent | 809f1d3e822988062856a6fd8ec8ca33a6c29932 (diff) | |
download | musl-1b61e4cab919c39af4462ee2fbccc9e07a59aac0.zip musl-1b61e4cab919c39af4462ee2fbccc9e07a59aac0.tar.gz musl-1b61e4cab919c39af4462ee2fbccc9e07a59aac0.tar.bz2 |
fix missing barriers in powerpc atomic store
(cherry picked from commit 522a0de2101abd12b19a4d2ba5c09abbb7c5fc79)
Diffstat (limited to 'arch/powerpc/atomic.h')
-rw-r--r-- | arch/powerpc/atomic.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/powerpc/atomic.h b/arch/powerpc/atomic.h index c4ad40c..a082c09 100644 --- a/arch/powerpc/atomic.h +++ b/arch/powerpc/atomic.h @@ -77,7 +77,11 @@ static inline void a_dec(volatile int *x) static inline void a_store(volatile int *p, int x) { - *p=x; + __asm__ __volatile__ ("\n" + " sync\n" + " stw %1, %0\n" + " isync\n" + : "=m"(*p) : "r"(x) : "memory" ); } static inline void a_spin() |