summaryrefslogtreecommitdiff
path: root/arch/x86_64/atomic.h
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2014-10-10 18:17:09 -0400
committerRich Felker <dalias@aerifal.cx>2014-10-10 18:17:09 -0400
commit867b1822f30a76cb9c8342da29eb28ed75908fa9 (patch)
tree9c0f489e301ae87ce0296adab65c488d926ac4b9 /arch/x86_64/atomic.h
parent08b996d180323775d5457944eefbb8a51ea72539 (diff)
downloadmusl-867b1822f30a76cb9c8342da29eb28ed75908fa9.tar.gz
musl-867b1822f30a76cb9c8342da29eb28ed75908fa9.tar.bz2
musl-867b1822f30a76cb9c8342da29eb28ed75908fa9.tar.xz
musl-867b1822f30a76cb9c8342da29eb28ed75908fa9.zip
add explicit barrier operation to internal atomic.h API
Diffstat (limited to 'arch/x86_64/atomic.h')
-rw-r--r--arch/x86_64/atomic.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/x86_64/atomic.h b/arch/x86_64/atomic.h
index ae0a576c..333098c3 100644
--- a/arch/x86_64/atomic.h
+++ b/arch/x86_64/atomic.h
@@ -91,6 +91,11 @@ static inline void a_spin()
__asm__ __volatile__( "pause" : : : "memory" );
}
+static inline void a_barrier()
+{
+ __asm__ __volatile__( "" : : : "memory" );
+}
+
static inline void a_crash()
{
__asm__ __volatile__( "hlt" : : : "memory" );