summaryrefslogtreecommitdiff
path: root/src/global.c
diff options
context:
space:
mode:
authorVicent Martí <vicent@github.com>2013-08-28 09:38:14 -0700
committerVicent Martí <vicent@github.com>2013-08-28 09:38:14 -0700
commitdbecec37a74a04a350e7c2ef6aee49d5d833d768 (patch)
tree5d911cac3bd602a3eab4c095ef8e96b84db332b3 /src/global.c
parent1ef05e3f0ea8fa8db2167307101c8c43d1c1784b (diff)
parentb2d3efcbce2d12cfa9736ab4f9283c91600a8a75 (diff)
downloadlibgit2-dbecec37a74a04a350e7c2ef6aee49d5d833d768.tar.gz
Merge pull request #1805 from libgit2/threading-packed-load
Thread safety for the refdb_fs
Diffstat (limited to 'src/global.c')
-rw-r--r--src/global.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/global.c b/src/global.c
index a06d0c81f..b504e5e0a 100644
--- a/src/global.c
+++ b/src/global.c
@@ -71,18 +71,22 @@ int git_threads_init(void)
GIT_MEMORY_BARRIER;
+ win32_pthread_initialize();
+
return error;
}
void git_threads_shutdown(void)
{
+ /* Shut down any subsystems that have global state */
+ win32_pthread_shutdown();
+ git_futils_dirs_free();
+ git_hash_global_shutdown();
+
TlsFree(_tls_index);
_tls_init = 0;
- git_mutex_free(&git__mwindow_mutex);
- /* Shut down any subsystems that have global state */
- git_hash_global_shutdown();
- git_futils_dirs_free();
+ git_mutex_free(&git__mwindow_mutex);
}
git_global_st *git__global_state(void)