Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
ec5a43b6
Commit
ec5a43b6
authored
Mar 18, 2016
by
Edward Thomson
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3699 from libgit2/cmn/win32-free-tls
win32: free thread-local data on thread exit
parents
3a43677e
a177756b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
src/global.c
+14
-0
No files found.
src/global.c
View file @
ec5a43b6
...
@@ -226,6 +226,20 @@ void git__free_tls_data(void)
...
@@ -226,6 +226,20 @@ void git__free_tls_data(void)
TlsSetValue
(
_tls_index
,
NULL
);
TlsSetValue
(
_tls_index
,
NULL
);
}
}
BOOL
WINAPI
DllMain
(
HINSTANCE
hInstDll
,
DWORD
fdwReason
,
LPVOID
lpvReserved
)
{
/* This is how Windows lets us know our thread is being shut down */
if
(
fdwReason
==
DLL_THREAD_DETACH
)
{
git__free_tls_data
();
}
/*
* Windows pays attention to this during library loading. We don't do anything
* so we trivially succeed.
*/
return
TRUE
;
}
#elif defined(GIT_THREADS) && defined(_POSIX_THREADS)
#elif defined(GIT_THREADS) && defined(_POSIX_THREADS)
static
pthread_key_t
_tls_key
;
static
pthread_key_t
_tls_key
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment