Skip to content

Commit

Permalink
Use _ReadWriteBarrier() rather than MemoryBarrier() for preventing co…
Browse files Browse the repository at this point in the history
…mpile optimization
  • Loading branch information
vaintroub committed Apr 6, 2016
1 parent fd7a8d1 commit 4b6a351
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion storage/innobase/include/ut0ut.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ struct ut_when_dtor {
#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
Expand Down
2 changes: 1 addition & 1 deletion storage/xtradb/include/ut0ut.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ struct ut_when_dtor {
#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
Expand Down

0 comments on commit 4b6a351

Please sign in to comment.