diff options
author | Edward Thomson <ethomson@edwardthomson.com> | 2014-11-06 10:25:23 -0500 |
---|---|---|
committer | Edward Thomson <ethomson@edwardthomson.com> | 2014-11-06 10:25:23 -0500 |
commit | 7bb639911b04addddfda86ca7f61398f779b0d7f (patch) | |
tree | 82fde5fed02355a0b39a9f0e31c538b75f7a3059 /include | |
parent | f890a84fe00091ac4b9430c131e25d5bf6d3eafe (diff) | |
parent | 15bea02c04ebf3172d495f14219b30eba262eb6a (diff) | |
download | libgit2-7bb639911b04addddfda86ca7f61398f779b0d7f.tar.gz |
Merge pull request #2676 from libgit2/cmn/threading
Threading and crypto libraries
Diffstat (limited to 'include')
-rw-r--r-- | include/git2/threads.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/git2/threads.h b/include/git2/threads.h index 11f89729a..6b4287033 100644 --- a/include/git2/threads.h +++ b/include/git2/threads.h @@ -44,6 +44,22 @@ GIT_EXTERN(int) git_threads_init(void); */ GIT_EXTERN(void) git_threads_shutdown(void); +/** + * Initialize the OpenSSL locks + * + * OpenSSL requires the application to determine how it performs + * locking. This is a convenience function which libgit2 provides for + * allocating and initializing the locks as well as setting the + * locking function to use the system's native locking functions. + * + * The locking function will be cleared and the memory will be freed + * when you call git_threads_sutdown(). + * + * @return 0 on success, -1 if there are errors or if libgit2 was not + * built with OpenSSL and threading support. + */ +GIT_EXTERN(int) git_openssl_set_locking(void); + /** @} */ GIT_END_DECL #endif |