2 * Copyright (C) 2009-2012 the libgit2 contributors
4 * This file is part of libgit2, distributed under the GNU GPL v2 with
5 * a Linking Exception. For full terms see the included COPYING file.
7 #ifndef INCLUDE_global_h__
8 #define INCLUDE_global_h__
13 #if defined(GIT_THREADS) && defined(_MSC_VER)
14 # define GIT_MEMORY_BARRIER MemoryBarrier()
15 #elif defined(GIT_THREADS)
16 # define GIT_MEMORY_BARRIER __sync_synchronize()
18 # define GIT_MEMORY_BARRIER /* noop */
22 git_error
*last_error
;
26 git_global_st
*git__global_state(void);
28 extern git_mutex git__mwindow_mutex
;
30 #define GIT_GLOBAL (git__global_state())