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
f1ef8a4d
Commit
f1ef8a4d
authored
Jul 19, 2017
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Add platform-specific versions of the thread data structure.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
6effc483
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
5 deletions
+17
-5
signal_i386.c
dlls/ntdll/signal_i386.c
+0
-0
signal_x86_64.c
dlls/ntdll/signal_x86_64.c
+17
-5
No files found.
dlls/ntdll/signal_i386.c
View file @
f1ef8a4d
This diff is collapsed.
Click to expand it.
dlls/ntdll/signal_x86_64.c
View file @
f1ef8a4d
...
...
@@ -308,6 +308,18 @@ typedef int (*wine_signal_handler)(unsigned int sig);
static
wine_signal_handler
handlers
[
256
];
struct
amd64_thread_data
{
void
*
exit_frame
;
/* exit frame pointer */
};
C_ASSERT
(
sizeof
(
struct
amd64_thread_data
)
<=
sizeof
(((
TEB
*
)
0
)
->
SpareBytes1
)
);
static
inline
struct
amd64_thread_data
*
amd64_thread_data
(
void
)
{
return
(
struct
amd64_thread_data
*
)
NtCurrentTeb
()
->
SpareBytes1
;
}
/***********************************************************************
* Dynamic unwind table
*/
...
...
@@ -3992,7 +4004,7 @@ USHORT WINAPI RtlCaptureStackBackTrace( ULONG skip, ULONG count, PVOID *buffer,
*/
void
call_thread_func
(
LPTHREAD_START_ROUTINE
entry
,
void
*
arg
,
void
*
frame
)
{
ntdll_get
_thread_data
()
->
exit_frame
=
frame
;
amd64
_thread_data
()
->
exit_frame
=
frame
;
__TRY
{
RtlExitUserThread
(
entry
(
arg
));
...
...
@@ -4041,8 +4053,8 @@ __ASM_GLOBAL_FUNC( call_thread_exit_func,
*/
void
WINAPI
RtlExitUserThread
(
ULONG
status
)
{
if
(
!
ntdll_get
_thread_data
()
->
exit_frame
)
exit_thread
(
status
);
call_thread_exit_func
(
status
,
exit_thread
,
ntdll_get
_thread_data
()
->
exit_frame
);
if
(
!
amd64
_thread_data
()
->
exit_frame
)
exit_thread
(
status
);
call_thread_exit_func
(
status
,
exit_thread
,
amd64
_thread_data
()
->
exit_frame
);
}
/***********************************************************************
...
...
@@ -4050,8 +4062,8 @@ void WINAPI RtlExitUserThread( ULONG status )
*/
void
abort_thread
(
int
status
)
{
if
(
!
ntdll_get
_thread_data
()
->
exit_frame
)
terminate_thread
(
status
);
call_thread_exit_func
(
status
,
terminate_thread
,
ntdll_get
_thread_data
()
->
exit_frame
);
if
(
!
amd64
_thread_data
()
->
exit_frame
)
terminate_thread
(
status
);
call_thread_exit_func
(
status
,
terminate_thread
,
amd64
_thread_data
()
->
exit_frame
);
}
/**********************************************************************
...
...
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