static void synchronized_threads_shutdown(void) { /* Shut down any subsystems that have global state */ git__shutdown(); TlsFree(_tls_index); git_mutex_free(&git__mwindow_mutex); }
int git_libgit2_shutdown(void) { void *ptr = NULL; pthread_once_t new_once = PTHREAD_ONCE_INIT; int ret; if ((ret = git_atomic_dec(&git__n_inits)) != 0) return ret; /* Shut down any subsystems that have global state */ git__shutdown(); uninit_ssl(); ptr = pthread_getspecific(_tls_key); pthread_setspecific(_tls_key, NULL); git__global_state_cleanup(ptr); git__free(ptr); pthread_key_delete(_tls_key); git_mutex_free(&git__mwindow_mutex); _once_init = new_once; return 0; }
int git_libgit2_shutdown(void) { int ret; /* Shut down any subsystems that have global state */ if ((ret = git_atomic_dec(&git__n_inits)) != 0) return ret; git__shutdown(); git__global_state_cleanup(&__state); uninit_ssl(); return 0; }
void git_threads_shutdown(void) { void *ptr = NULL; pthread_once_t new_once = PTHREAD_ONCE_INIT; if (git_atomic_dec(&git__n_inits) > 0) return; /* Shut down any subsystems that have global state */ git__shutdown(); ptr = pthread_getspecific(_tls_key); pthread_setspecific(_tls_key, NULL); git__free(ptr); pthread_key_delete(_tls_key); git_mutex_free(&git__mwindow_mutex); _once_init = new_once; }
void git_threads_shutdown(void) { /* Shut down any subsystems that have global state */ if (0 == git_atomic_dec(&git__n_inits)) git__shutdown(); }