diff options
| author | Vicent Martà <vicent@github.com> | 2013-08-28 09:38:14 -0700 |
|---|---|---|
| committer | Vicent Martà <vicent@github.com> | 2013-08-28 09:38:14 -0700 |
| commit | dbecec37a74a04a350e7c2ef6aee49d5d833d768 (patch) | |
| tree | 5d911cac3bd602a3eab4c095ef8e96b84db332b3 /src/global.c | |
| parent | 1ef05e3f0ea8fa8db2167307101c8c43d1c1784b (diff) | |
| parent | b2d3efcbce2d12cfa9736ab4f9283c91600a8a75 (diff) | |
| download | libgit2-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.c | 12 |
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) |
