diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/global.c | 18 | ||||
-rw-r--r-- | src/hash/hash_win32.c | 2 |
2 files changed, 10 insertions, 10 deletions
diff --git a/src/global.c b/src/global.c index 3c91860cd..296be86c7 100644 --- a/src/global.c +++ b/src/global.c @@ -133,7 +133,7 @@ int git_openssl_set_locking(void) * Handle the global state with TLS * * If libgit2 is built with GIT_THREADS enabled, - * the `git_threads_init()` function must be called + * the `git_libgit2_init()` function must be called * before calling any other function of the library. * * This function allocates a TLS index (using pthreads @@ -156,9 +156,9 @@ int git_openssl_set_locking(void) */ /* - * `git_threads_init()` allows subsystems to perform global setup, + * `git_libgit2_init()` allows subsystems to perform global setup, * which may take place in the global scope. An explicit memory - * fence exists at the exit of `git_threads_init()`. Without this, + * fence exists at the exit of `git_libgit2_init()`. Without this, * CPU cores are free to reorder cache invalidation of `_tls_init` * before cache invalidation of the subsystems' newly written global * state. @@ -185,7 +185,7 @@ static int synchronized_threads_init(void) return error; } -int git_threads_init(void) +int git_libgit2_init(void) { int error = 0; @@ -210,7 +210,7 @@ static void synchronized_threads_shutdown(void) git_mutex_free(&git__mwindow_mutex); } -void git_threads_shutdown(void) +void git_libgit2_shutdown(void) { /* Enter the lock */ while (InterlockedCompareExchange(&_mutex, 1, 0)) { Sleep(0); } @@ -272,14 +272,14 @@ static void init_once(void) GIT_MEMORY_BARRIER; } -int git_threads_init(void) +int git_libgit2_init(void) { pthread_once(&_once_init, init_once); git_atomic_inc(&git__n_inits); return init_error; } -void git_threads_shutdown(void) +void git_libgit2_shutdown(void) { void *ptr = NULL; pthread_once_t new_once = PTHREAD_ONCE_INIT; @@ -320,7 +320,7 @@ git_global_st *git__global_state(void) static git_global_st __state; -int git_threads_init(void) +int git_libgit2_init(void) { static int ssl_inited = 0; @@ -333,7 +333,7 @@ int git_threads_init(void) return 0; } -void git_threads_shutdown(void) +void git_libgit2_shutdown(void) { /* Shut down any subsystems that have global state */ if (0 == git_atomic_dec(&git__n_inits)) diff --git a/src/hash/hash_win32.c b/src/hash/hash_win32.c index bb2231364..6bae53e55 100644 --- a/src/hash/hash_win32.c +++ b/src/hash/hash_win32.c @@ -236,7 +236,7 @@ int git_hash_ctx_init(git_hash_ctx *ctx) /* * When compiled with GIT_THREADS, the global hash_prov data is - * initialized with git_threads_init. Otherwise, it must be initialized + * initialized with git_libgit2_init. Otherwise, it must be initialized * at first use. */ if (hash_prov.type == INVALID && (error = git_hash_global_init()) < 0) |