Commit 6e0fc1a63138f959cd2aac05e85f70cf9e22a189

Edward Thomson 2016-02-07T14:10:38

mingw: use gcc-like memory barrier Use the gcc-like memory barrier (__sync_synchronize) on mingw.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/thread-utils.h b/src/thread-utils.h
index dd1136c..14c8a41 100644
--- a/src/thread-utils.h
+++ b/src/thread-utils.h
@@ -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()