Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6e0fc1a

Browse files
author
Edward Thomson
committed
mingw: use gcc-like memory barrier
Use the gcc-like memory barrier (__sync_synchronize) on mingw.
1 parent 8a6d667 commit 6e0fc1a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/thread-utils.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ GIT_INLINE(int) git_atomic_get(git_atomic *a)
275275

276276
extern int git_online_cpus(void);
277277

278-
#if defined(GIT_THREADS) && defined(GIT_WIN32)
278+
#if defined(GIT_THREADS) && defined(_MSC_VER)
279279
# define GIT_MEMORY_BARRIER MemoryBarrier()
280280
#elif defined(GIT_THREADS)
281281
# define GIT_MEMORY_BARRIER __sync_synchronize()

0 commit comments

Comments
 (0)