diff options
author | Vicent Marti <tanoku@gmail.com> | 2013-04-16 19:46:41 +0400 |
---|---|---|
committer | Vicent Marti <tanoku@gmail.com> | 2013-04-16 19:46:41 +0400 |
commit | a50086d174658914d4d6462afbc83b02825b1f5b (patch) | |
tree | e8daa1c7bf678222cf351445179837bed7db3a72 /src/global.h | |
parent | 5b9fac39d8a76b9139667c26a63e6b3f204b3977 (diff) | |
parent | f124ebd457bfbf43de3516629aaba5a279636e04 (diff) |
Merge branch 'development'v0.18.0
Diffstat (limited to 'src/global.h')
-rw-r--r-- | src/global.h | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/src/global.h b/src/global.h index 2b525ce07..f0ad1df29 100644 --- a/src/global.h +++ b/src/global.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009-2012 the libgit2 contributors + * Copyright (C) the libgit2 contributors. All rights reserved. * * This file is part of libgit2, distributed under the GNU GPL v2 with * a Linking Exception. For full terms see the included COPYING file. @@ -8,20 +8,25 @@ #define INCLUDE_global_h__ #include "mwindow.h" +#include "hash.h" -typedef struct { - struct { - char last[1024]; - } error; +#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; git_error error_t; - - git_mwindow_ctl mem_ctl; } git_global_st; git_global_st *git__global_state(void); +extern git_mutex git__mwindow_mutex; + #define GIT_GLOBAL (git__global_state()) #endif |