]> git.proxmox.com Git - libgit2.git/commitdiff
Rename routine to free TLS data
authorJeff Hostetler <jeffhost@microsoft.com>
Sat, 18 Apr 2015 13:07:48 +0000 (09:07 -0400)
committerJeff Hostetler <jeffhost@microsoft.com>
Sat, 18 Apr 2015 13:07:48 +0000 (09:07 -0400)
src/global.c
src/global.h
src/win32/pthread.c

index b5e4b5d00d88171c2e264254e8fcf9494dad685d..f267fbd24c63d7d86343077ae211a5228c7aa3c9 100644 (file)
@@ -226,7 +226,7 @@ static void synchronized_threads_shutdown(void)
        /* Shut down any subsystems that have global state */
        git__shutdown();
 
-       git__free_thread_global_state();
+       git__free_tls_data();
 
        TlsFree(_tls_index);
        git_mutex_free(&git__mwindow_mutex);
@@ -267,7 +267,12 @@ git_global_st *git__global_state(void)
        return ptr;
 }
 
-void git__free_thread_global_state(void)
+/**
+ * Free the TLS data associated with this thread.
+ * This should only be used by the thread as it
+ * is exiting.
+ */
+void git__free_tls_data(void)
 {
        void *ptr = TlsGetValue(_tls_index);
        if (!ptr)
index 9d763b0c2167373b2cd8b3d382e4e8dd8418f461..f56bec46c571bf794e61a308bba7d1cb44ff3648 100644 (file)
@@ -32,6 +32,6 @@ typedef void (*git_global_shutdown_fn)(void);
 
 extern void git__on_shutdown(git_global_shutdown_fn callback);
 
-extern void git__free_thread_global_state(void);
+extern void git__free_tls_data(void);
 
 #endif
index a6465d47ff37f864c823bec5ce3c449d77755403..a1cc1893251e3ec49aaec0b9332253375c32f40d 100644 (file)
@@ -20,7 +20,7 @@ static DWORD WINAPI git_win32__threadproc(LPVOID lpParameter)
 
        thread->result = thread->proc(thread->param);
 
-       git__free_thread_global_state();
+       git__free_tls_data();
 
        return CLEAN_THREAD_EXIT;
 }