summaryrefslogtreecommitdiff
path: root/src/global.h
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@microsoft.com>2012-11-13 10:10:40 -0600
committerEdward Thomson <ethomson@edwardthomson.com>2012-11-13 10:23:05 -0600
commit7ebefd22e79e92542d68743af933c1a188f4d5a3 (patch)
tree91cc207a51ff097cb9e24ee690eaf3d5776f6e97 /src/global.h
parent603bee07918b50051d7bb45722932fc409b38a67 (diff)
downloadlibgit2-7ebefd22e79e92542d68743af933c1a188f4d5a3.tar.gz
move hash library func ptrs to global global
Diffstat (limited to 'src/global.h')
-rw-r--r--src/global.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/global.h b/src/global.h
index b9f8b6773..1025cf7bc 100644
--- a/src/global.h
+++ b/src/global.h
@@ -10,14 +10,15 @@
#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()
+#endif
+
typedef struct {
git_error *last_error;
git_error error_t;
-
-#ifdef WIN32_SHA1
- git_hash_prov hash_prov;
-#endif
-
} git_global_st;
git_global_st *git__global_state(void);