summaryrefslogtreecommitdiff
path: root/src/global.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/global.h')
-rw-r--r--src/global.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/global.h b/src/global.h
index 0ad41ee63..b117714a8 100644
--- a/src/global.h
+++ b/src/global.h
@@ -8,6 +8,15 @@
#define INCLUDE_global_h__
#include "mwindow.h"
+#include "hash.h"
+
+#if defined(GIT_THREADS) && defined(_MSC_VER)
+# define GIT_MEMORY_BARRIER MemoryBarrier()
+#elif defined(GIT_THREADS)
+# define GIT_MEMORY_BARRIER __sync_synchronize()
+#else
+# define GIT_MEMORY_BARRIER /* noop */
+#endif
typedef struct {
git_error *last_error;