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
06c985d8
Commit
06c985d8
authored
Apr 18, 2015
by
Jeff Hostetler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename routine to free TLS data
parent
d3fb7d93
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
4 deletions
+9
-4
src/global.c
+7
-2
src/global.h
+1
-1
src/win32/pthread.c
+1
-1
No files found.
src/global.c
View file @
06c985d8
...
...
@@ -226,7 +226,7 @@ static void synchronized_threads_shutdown(void)
/* Shut down any subsystems that have global state */
git__shutdown
();
git__free_t
hread_global_state
();
git__free_t
ls_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
)
...
...
src/global.h
View file @
06c985d8
...
...
@@ -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_t
hread_global_state
(
void
);
extern
void
git__free_t
ls_data
(
void
);
#endif
src/win32/pthread.c
View file @
06c985d8
...
...
@@ -20,7 +20,7 @@ static DWORD WINAPI git_win32__threadproc(LPVOID lpParameter)
thread
->
result
=
thread
->
proc
(
thread
->
param
);
git__free_t
hread_global_state
();
git__free_t
ls_data
();
return
CLEAN_THREAD_EXIT
;
}
...
...
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