summaryrefslogtreecommitdiff
path: root/storage/innobase/include
diff options
context:
space:
mode:
authorAlexey Kopytov <akopytov@gmail.com>2015-05-26 23:56:00 +0300
committerAlexey Kopytov <akopytov@gmail.com>2015-05-26 23:56:00 +0300
commit70bc0a3ef40b1b9348750c12ca5df8f0863b7cfd (patch)
tree0fddb6c0905064a5d5e6184c849d6c169aba409d /storage/innobase/include
parent17a37796e1947e2227824416d297a746a1dc6c26 (diff)
downloadmariadb-git-70bc0a3ef40b1b9348750c12ca5df8f0863b7cfd.tar.gz
Fixes MDEV-7658: MDEV-7026 fix reintroduces MDEV-6615 on AArch64
This is an addendum to the fix for MDEV-7026. The ARM memory model is similar to that of PowerPC and thus needs the same semantics with respect to memory barriers. That is, os_atomic_test_and_set_*_release() must be a store with a release barrier followed by a full barrier. Unlike x86 using __sync_lock_test_and_set() which is implemented as “exclusive load with acquire barriers + exclusive store” is insufficient in contexts where os_atomic_test_and_set_*_release() macros are used.
Diffstat (limited to 'storage/innobase/include')
-rw-r--r--storage/innobase/include/os0sync.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/storage/innobase/include/os0sync.h b/storage/innobase/include/os0sync.h
index 6f090c4b1b4..7fd1fde5e76 100644
--- a/storage/innobase/include/os0sync.h
+++ b/storage/innobase/include/os0sync.h
@@ -324,7 +324,7 @@ amount of increment. */
/**********************************************************//**
Returns the old value of *ptr, atomically sets *ptr to new_val */
-#ifdef __powerpc__
+#if defined(__powerpc__) || defined(__aarch64__)
/*
os_atomic_test_and_set_byte_release() should imply a release barrier before
setting, and a full barrier after. But __sync_lock_test_and_set() is only