Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:59:36

0001 /*
0002  * Copyright (C) the libgit2 contributors. All rights reserved.
0003  *
0004  * This file is part of libgit2, distributed under the GNU GPL v2 with
0005  * a Linking Exception. For full terms see the included COPYING file.
0006  */
0007 #ifndef INCLUDE_git_openssl_h__
0008 #define INCLUDE_git_openssl_h__
0009 
0010 #include "git2/common.h"
0011 
0012 GIT_BEGIN_DECL
0013 
0014 /**
0015  * Initialize the OpenSSL locks
0016  *
0017  * OpenSSL requires the application to determine how it performs
0018  * locking.
0019  *
0020  * This is a last-resort convenience function which libgit2 provides for
0021  * allocating and initializing the locks as well as setting the
0022  * locking function to use the system's native locking functions.
0023  *
0024  * The locking function will be cleared and the memory will be freed
0025  * when you call git_threads_sutdown().
0026  *
0027  * If your programming language has an OpenSSL package/bindings, it
0028  * likely sets up locking. You should very strongly prefer that over
0029  * this function.
0030  *
0031  * @return 0 on success, -1 if there are errors or if libgit2 was not
0032  * built with OpenSSL and threading support.
0033  */
0034 GIT_EXTERN(int) git_openssl_set_locking(void);
0035 
0036 GIT_END_DECL
0037 #endif
0038