File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -97,7 +97,13 @@ struct ut_when_dtor {
97
97
# define UT_RELAX_CPU () ((void )0 ) /* avoid warning for an empty statement */
98
98
# endif
99
99
100
- #define UT_COMPILER_BARRIER () __asm__ __volatile__ (" " :::" memory" )
100
+ #if defined (__GNUC__)
101
+ # define UT_COMPILER_BARRIER () __asm__ __volatile__ (" " :::" memory" )
102
+ #elif defined (_MSC_VER)
103
+ # define UT_COMPILER_BARRIER () MemoryBarrier()
104
+ #else
105
+ # define UT_COMPILER_BARRIER ()
106
+ #endif
101
107
102
108
# if defined(HAVE_HMT_PRIORITY_INSTRUCTION)
103
109
#include < sys/platform/ppc.h>
Original file line number Diff line number Diff line change @@ -94,7 +94,13 @@ struct ut_when_dtor {
94
94
# define UT_RELAX_CPU () ((void )0 ) /* avoid warning for an empty statement */
95
95
# endif
96
96
97
- #define UT_COMPILER_BARRIER () __asm__ __volatile__ (" " :::" memory" )
97
+ #if defined (__GNUC__)
98
+ # define UT_COMPILER_BARRIER () __asm__ __volatile__ (" " :::" memory" )
99
+ #elif defined (_MSC_VER)
100
+ # define UT_COMPILER_BARRIER () MemoryBarrier()
101
+ #else
102
+ # define UT_COMPILER_BARRIER ()
103
+ #endif
98
104
99
105
# if defined(HAVE_HMT_PRIORITY_INSTRUCTION)
100
106
#include < sys/platform/ppc.h>
You can’t perform that action at this time.
0 commit comments