Commit fd7a8d18 authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

Fix compile error in UT_COMPILER_BARRIER on Visual Studio compiler.

parent 9794cf23
......@@ -97,7 +97,13 @@ struct ut_when_dtor {
# 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>
......
......@@ -94,7 +94,13 @@ struct ut_when_dtor {
# 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>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment