Fix compile error in UT_COMPILER_BARRIER on Visual Studio compiler.

This commit is contained in:
Vladislav Vaintroub 2016-04-06 13:38:22 +02:00
parent 9794cf2311
commit fd7a8d18ea
2 changed files with 14 additions and 2 deletions
storage
innobase/include
xtradb/include

View file

@ -97,7 +97,13 @@ private:
# define UT_RELAX_CPU() ((void)0) /* avoid warning for an empty statement */
# endif
#define UT_COMPILER_BARRIER() __asm__ __volatile__ ("":::"memory")
#if defined (__GNUC__)
# define UT_COMPILER_BARRIER() __asm__ __volatile__ ("":::"memory")
#elif defined (_MSC_VER)
# define UT_COMPILER_BARRIER() MemoryBarrier()
#else
# define UT_COMPILER_BARRIER()
#endif
# if defined(HAVE_HMT_PRIORITY_INSTRUCTION)
#include <sys/platform/ppc.h>

View file

@ -94,7 +94,13 @@ private:
# define UT_RELAX_CPU() ((void)0) /* avoid warning for an empty statement */
# endif
#define UT_COMPILER_BARRIER() __asm__ __volatile__ ("":::"memory")
#if defined (__GNUC__)
# define UT_COMPILER_BARRIER() __asm__ __volatile__ ("":::"memory")
#elif defined (_MSC_VER)
# define UT_COMPILER_BARRIER() MemoryBarrier()
#else
# define UT_COMPILER_BARRIER()
#endif
# if defined(HAVE_HMT_PRIORITY_INSTRUCTION)
#include <sys/platform/ppc.h>