fix missing barriers in powerpc atomic store

This commit is contained in:
Rich Felker 2014-07-19 18:34:10 -04:00
parent 884cc0c7e2
commit 522a0de210
1 changed files with 5 additions and 1 deletions

View File

@ -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()