mingw: use gcc-like memory barrier

Use the gcc-like memory barrier (__sync_synchronize) on mingw.
This commit is contained in:
Edward Thomson 2016-02-07 14:10:38 -08:00
parent 8a6d667763
commit 6e0fc1a631

View File

@ -275,7 +275,7 @@ GIT_INLINE(int) git_atomic_get(git_atomic *a)
extern int git_online_cpus(void);
#if defined(GIT_THREADS) && defined(GIT_WIN32)
#if defined(GIT_THREADS) && defined(_MSC_VER)
# define GIT_MEMORY_BARRIER MemoryBarrier()
#elif defined(GIT_THREADS)
# define GIT_MEMORY_BARRIER __sync_synchronize()