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
aced1b82
Commit
aced1b82
authored
Nov 19, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Move initialization of the debug registers to signal_i386.c.
parent
d4f1fffa
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
10 deletions
+15
-10
signal_i386.c
dlls/ntdll/signal_i386.c
+15
-0
thread.c
dlls/ntdll/thread.c
+0
-10
No files found.
dlls/ntdll/signal_i386.c
View file @
aced1b82
...
...
@@ -2014,6 +2014,7 @@ NTSTATUS signal_alloc_thread( TEB **teb )
{
static
size_t
sigstack_zero_bits
;
struct
ntdll_thread_data
*
thread_data
;
TEB
*
parent
=
NULL
;
SIZE_T
size
;
void
*
addr
=
NULL
;
NTSTATUS
status
;
...
...
@@ -2027,6 +2028,7 @@ NTSTATUS signal_alloc_thread( TEB **teb )
signal_stack_mask
=
(
1
<<
sigstack_zero_bits
)
-
1
;
signal_stack_size
=
(
1
<<
sigstack_zero_bits
)
-
teb_size
;
}
else
parent
=
NtCurrentTeb
();
size
=
signal_stack_mask
+
1
;
if
(
!
(
status
=
NtAllocateVirtualMemory
(
NtCurrentProcess
(),
&
addr
,
sigstack_zero_bits
,
...
...
@@ -2042,6 +2044,19 @@ NTSTATUS signal_alloc_thread( TEB **teb )
NtFreeVirtualMemory
(
NtCurrentProcess
(),
&
addr
,
&
size
,
MEM_RELEASE
);
status
=
STATUS_TOO_MANY_THREADS
;
}
if
(
parent
)
{
/* inherit debug registers from parent thread */
struct
ntdll_thread_regs
*
parent_regs
=
(
struct
ntdll_thread_regs
*
)
parent
->
SpareBytes1
;
struct
ntdll_thread_regs
*
thread_regs
=
(
struct
ntdll_thread_regs
*
)(
*
teb
)
->
SpareBytes1
;
thread_regs
->
dr0
=
parent_regs
->
dr0
;
thread_regs
->
dr1
=
parent_regs
->
dr1
;
thread_regs
->
dr2
=
parent_regs
->
dr2
;
thread_regs
->
dr3
=
parent_regs
->
dr3
;
thread_regs
->
dr6
=
parent_regs
->
dr6
;
thread_regs
->
dr7
=
parent_regs
->
dr7
;
}
}
return
status
;
}
...
...
dlls/ntdll/thread.c
View file @
aced1b82
...
...
@@ -451,7 +451,6 @@ NTSTATUS WINAPI RtlCreateUserThread( HANDLE process, const SECURITY_DESCRIPTOR *
pthread_t
pthread_id
;
pthread_attr_t
attr
;
struct
ntdll_thread_data
*
thread_data
;
struct
ntdll_thread_regs
*
thread_regs
;
struct
startup_info
*
info
=
NULL
;
HANDLE
handle
=
0
;
TEB
*
teb
=
NULL
;
...
...
@@ -524,20 +523,11 @@ NTSTATUS WINAPI RtlCreateUserThread( HANDLE process, const SECURITY_DESCRIPTOR *
info
->
entry_arg
=
param
;
thread_data
=
(
struct
ntdll_thread_data
*
)
teb
->
SystemReserved2
;
thread_regs
=
(
struct
ntdll_thread_regs
*
)
teb
->
SpareBytes1
;
thread_data
->
request_fd
=
request_pipe
[
1
];
thread_data
->
reply_fd
=
-
1
;
thread_data
->
wait_fd
[
0
]
=
-
1
;
thread_data
->
wait_fd
[
1
]
=
-
1
;
/* inherit debug registers from parent thread */
thread_regs
->
dr0
=
ntdll_get_thread_regs
()
->
dr0
;
thread_regs
->
dr1
=
ntdll_get_thread_regs
()
->
dr1
;
thread_regs
->
dr2
=
ntdll_get_thread_regs
()
->
dr2
;
thread_regs
->
dr3
=
ntdll_get_thread_regs
()
->
dr3
;
thread_regs
->
dr6
=
ntdll_get_thread_regs
()
->
dr6
;
thread_regs
->
dr7
=
ntdll_get_thread_regs
()
->
dr7
;
if
((
status
=
virtual_alloc_thread_stack
(
teb
,
stack_reserve
,
stack_commit
)))
goto
error
;
pthread_attr_init
(
&
attr
);
...
...
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