Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
1f6423f7
Commit
1f6423f7
authored
Jun 24, 2020
by
Paul Gofman
Committed by
Alexandre Julliard
Jun 24, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Call TLS callbacks for main exe on thread detach.
Signed-off-by:
Paul Gofman
<
pgofman@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
1dc33833
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
loader.c
dlls/ntdll/loader.c
+4
-0
No files found.
dlls/ntdll/loader.c
View file @
1f6423f7
...
@@ -3178,6 +3178,7 @@ void WINAPI LdrShutdownThread(void)
...
@@ -3178,6 +3178,7 @@ void WINAPI LdrShutdownThread(void)
{
{
PLIST_ENTRY
mark
,
entry
;
PLIST_ENTRY
mark
,
entry
;
LDR_DATA_TABLE_ENTRY
*
mod
;
LDR_DATA_TABLE_ENTRY
*
mod
;
WINE_MODREF
*
wm
;
UINT
i
;
UINT
i
;
void
**
pointers
;
void
**
pointers
;
...
@@ -3187,6 +3188,7 @@ void WINAPI LdrShutdownThread(void)
...
@@ -3187,6 +3188,7 @@ void WINAPI LdrShutdownThread(void)
if
(
process_detaching
)
return
;
if
(
process_detaching
)
return
;
RtlEnterCriticalSection
(
&
loader_section
);
RtlEnterCriticalSection
(
&
loader_section
);
wm
=
get_modref
(
NtCurrentTeb
()
->
Peb
->
ImageBaseAddress
);
mark
=
&
NtCurrentTeb
()
->
Peb
->
LdrData
->
InInitializationOrderModuleList
;
mark
=
&
NtCurrentTeb
()
->
Peb
->
LdrData
->
InInitializationOrderModuleList
;
for
(
entry
=
mark
->
Blink
;
entry
!=
mark
;
entry
=
entry
->
Blink
)
for
(
entry
=
mark
->
Blink
;
entry
!=
mark
;
entry
=
entry
->
Blink
)
...
@@ -3202,6 +3204,8 @@ void WINAPI LdrShutdownThread(void)
...
@@ -3202,6 +3204,8 @@ void WINAPI LdrShutdownThread(void)
DLL_THREAD_DETACH
,
NULL
);
DLL_THREAD_DETACH
,
NULL
);
}
}
if
(
wm
->
ldr
.
TlsIndex
!=
-
1
)
call_tls_callbacks
(
wm
->
ldr
.
DllBase
,
DLL_THREAD_DETACH
);
RtlAcquirePebLock
();
RtlAcquirePebLock
();
RemoveEntryList
(
&
NtCurrentTeb
()
->
TlsLinks
);
RemoveEntryList
(
&
NtCurrentTeb
()
->
TlsLinks
);
if
((
pointers
=
NtCurrentTeb
()
->
ThreadLocalStoragePointer
))
if
((
pointers
=
NtCurrentTeb
()
->
ThreadLocalStoragePointer
))
...
...
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