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
e3b059b5
Commit
e3b059b5
authored
Jul 24, 2020
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Store the thread startup info in the ntdll_thread_data structure.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
0e3f8c54
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
15 deletions
+6
-15
thread.c
dlls/ntdll/unix/thread.c
+4
-15
unix_private.h
dlls/ntdll/unix/unix_private.h
+2
-0
No files found.
dlls/ntdll/unix/thread.c
View file @
e3b059b5
...
...
@@ -83,13 +83,6 @@ static void pthread_exit_wrapper( int status )
}
/* info passed to a starting thread */
struct
startup_info
{
PRTL_THREAD_START_ROUTINE
entry
;
void
*
arg
;
};
/***********************************************************************
* start_thread
*
...
...
@@ -97,7 +90,6 @@ struct startup_info
*/
static
void
start_thread
(
TEB
*
teb
)
{
struct
startup_info
*
info
=
(
struct
startup_info
*
)(
teb
+
1
);
struct
ntdll_thread_data
*
thread_data
=
(
struct
ntdll_thread_data
*
)
&
teb
->
GdiTebBatch
;
struct
debug_info
debug_info
;
BOOL
suspend
;
...
...
@@ -106,8 +98,8 @@ static void start_thread( TEB *teb )
thread_data
->
debug_info
=
&
debug_info
;
thread_data
->
pthread_id
=
pthread_self
();
signal_init_thread
(
teb
);
server_init_thread
(
info
->
entry
,
&
suspend
);
signal_start_thread
(
info
->
entry
,
info
->
arg
,
suspend
,
pRtlUserThreadStart
,
teb
);
server_init_thread
(
thread_data
->
start
,
&
suspend
);
signal_start_thread
(
thread_data
->
start
,
thread_data
->
param
,
suspend
,
pRtlUserThreadStart
,
teb
);
}
...
...
@@ -152,7 +144,6 @@ NTSTATUS WINAPI NtCreateThreadEx( HANDLE *handle, ACCESS_MASK access, OBJECT_ATT
data_size_t
len
;
struct
object_attributes
*
objattr
;
struct
ntdll_thread_data
*
thread_data
;
struct
startup_info
*
info
;
DWORD
tid
=
0
;
int
request_pipe
[
2
];
SIZE_T
extra_stack
=
PTHREAD_STACK_MIN
;
...
...
@@ -236,10 +227,6 @@ NTSTATUS WINAPI NtCreateThreadEx( HANDLE *handle, ACCESS_MASK access, OBJECT_ATT
client_id
.
UniqueThread
=
ULongToHandle
(
tid
);
teb
->
ClientId
=
client_id
;
info
=
(
struct
startup_info
*
)(
teb
+
1
);
info
->
entry
=
start
;
info
->
arg
=
param
;
teb
->
Tib
.
StackBase
=
stack
.
StackBase
;
teb
->
Tib
.
StackLimit
=
stack
.
StackLimit
;
teb
->
DeallocationStack
=
stack
.
DeallocationStack
;
...
...
@@ -247,6 +234,8 @@ NTSTATUS WINAPI NtCreateThreadEx( HANDLE *handle, ACCESS_MASK access, OBJECT_ATT
thread_data
=
(
struct
ntdll_thread_data
*
)
&
teb
->
GdiTebBatch
;
thread_data
->
request_fd
=
request_pipe
[
1
];
thread_data
->
start_stack
=
(
char
*
)
teb
->
Tib
.
StackBase
;
thread_data
->
start
=
start
;
thread_data
->
param
=
param
;
pthread_attr_init
(
&
pthread_attr
);
pthread_attr_setstack
(
&
pthread_attr
,
teb
->
DeallocationStack
,
...
...
dlls/ntdll/unix/unix_private.h
View file @
e3b059b5
...
...
@@ -60,6 +60,8 @@ struct ntdll_thread_data
BOOL
wow64_redir
;
/* Wow64 filesystem redirection flag */
pthread_t
pthread_id
;
/* pthread thread id */
struct
list
entry
;
/* entry in TEB list */
PRTL_THREAD_START_ROUTINE
start
;
/* thread entry point */
void
*
param
;
/* thread entry point parameter */
};
C_ASSERT
(
sizeof
(
struct
ntdll_thread_data
)
<=
sizeof
(((
TEB
*
)
0
)
->
GdiTebBatch
)
);
...
...
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