]> git.proxmox.com Git - libgit2.git/blob - include/git2/global.h
4f90c4c2040c92cf9824d68be70ee15ca65344b2
[libgit2.git] / include / git2 / global.h
1 /*
2 * Copyright (C) the libgit2 contributors. All rights reserved.
3 *
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.
6 */
7 #ifndef INCLUDE_git_global_h__
8 #define INCLUDE_git_global_h__
9
10 #include "common.h"
11
12 GIT_BEGIN_DECL
13
14 /**
15 * Init the global state
16 *
17 * This function must the called before any other libgit2 function in
18 * order to set up global state and threading.
19 *
20 * This function may be called multiple times.
21 *
22 * @return 0 or an error code
23 */
24 GIT_EXTERN(int) git_libgit2_init(void);
25
26 /**
27 * Shutdown the global state
28 *
29 * Clean up the global state and threading context after calling it as
30 * many times as `git_libgit2_init()` was called.
31 *
32 */
33 GIT_EXTERN(void) git_libgit2_shutdown(void);
34
35 /** @} */
36 GIT_END_DECL
37 #endif
38