summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@mariadb.com>2016-04-06 14:15:44 +0200
committerVladislav Vaintroub <wlad@mariadb.com>2016-04-06 14:15:44 +0200
commit4b6a3518e4dc9088d1f42cd9bc487d06137d2760 (patch)
treed3c1d1b8b238b4adc7b9af89bfd2d5c47f378bfb /storage
parentfd7a8d18ea3a844be1a82490be3c154549dfee47 (diff)
downloadmariadb-git-4b6a3518e4dc9088d1f42cd9bc487d06137d2760.tar.gz
Use _ReadWriteBarrier() rather than MemoryBarrier() for preventing compile optimization
Diffstat (limited to 'storage')
-rw-r--r--storage/innobase/include/ut0ut.h2
-rw-r--r--storage/xtradb/include/ut0ut.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/storage/innobase/include/ut0ut.h b/storage/innobase/include/ut0ut.h
index 5c4a358f9a6..176f132704a 100644
--- a/storage/innobase/include/ut0ut.h
+++ b/storage/innobase/include/ut0ut.h
@@ -100,7 +100,7 @@ private:
#if defined (__GNUC__)
# define UT_COMPILER_BARRIER() __asm__ __volatile__ ("":::"memory")
#elif defined (_MSC_VER)
-# define UT_COMPILER_BARRIER() MemoryBarrier()
+# define UT_COMPILER_BARRIER() _ReadWriteBarrier()
#else
# define UT_COMPILER_BARRIER()
#endif
diff --git a/storage/xtradb/include/ut0ut.h b/storage/xtradb/include/ut0ut.h
index 053eb78e42b..980ac337002 100644
--- a/storage/xtradb/include/ut0ut.h
+++ b/storage/xtradb/include/ut0ut.h
@@ -97,7 +97,7 @@ private:
#if defined (__GNUC__)
# define UT_COMPILER_BARRIER() __asm__ __volatile__ ("":::"memory")
#elif defined (_MSC_VER)
-# define UT_COMPILER_BARRIER() MemoryBarrier()
+# define UT_COMPILER_BARRIER() _ReadWriteBarrier()
#else
# define UT_COMPILER_BARRIER()
#endif