summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/git2/threads.h16
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