summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/x32/atomic.h2
-rw-r--r--arch/x86_64/atomic.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/arch/x32/atomic.h b/arch/x32/atomic.h
index 2ab1f7a2..7690183d 100644
--- a/arch/x32/atomic.h
+++ b/arch/x32/atomic.h
@@ -83,7 +83,7 @@ static inline void a_dec(volatile int *x)
static inline void a_store(volatile int *p, int x)
{
- __asm__( "mov %1, %0 ; mfence" : "=m"(*p) : "r"(x) : "memory" );
+ __asm__( "mov %1, %0 ; lock ; orl $0,(%%rsp)" : "=m"(*p) : "r"(x) : "memory" );
}
static inline void a_spin()
diff --git a/arch/x86_64/atomic.h b/arch/x86_64/atomic.h
index 2ab1f7a2..7690183d 100644
--- a/arch/x86_64/atomic.h
+++ b/arch/x86_64/atomic.h
@@ -83,7 +83,7 @@ static inline void a_dec(volatile int *x)
static inline void a_store(volatile int *p, int x)
{
- __asm__( "mov %1, %0 ; mfence" : "=m"(*p) : "r"(x) : "memory" );
+ __asm__( "mov %1, %0 ; lock ; orl $0,(%%rsp)" : "=m"(*p) : "r"(x) : "memory" );
}
static inline void a_spin()