Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
e1eb6228
Commit
e1eb6228
authored
May 06, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Ask the server to suspend the thread in the get/set_thread_context requests.
parent
90982480
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
39 deletions
+33
-39
thread.c
dlls/ntdll/thread.c
+33
-39
No files found.
dlls/ntdll/thread.c
View file @
e1eb6228
...
...
@@ -699,7 +699,7 @@ NTSTATUS WINAPI NtSetContextThread( HANDLE handle, const CONTEXT *context )
SERVER_START_REQ
(
set_thread_context
)
{
req
->
handle
=
wine_server_obj_handle
(
handle
);
req
->
suspend
=
0
;
req
->
suspend
=
1
;
wine_server_add_data
(
req
,
&
server_context
,
sizeof
(
server_context
)
);
ret
=
wine_server_call
(
req
);
self
=
reply
->
self
;
...
...
@@ -708,28 +708,25 @@ NTSTATUS WINAPI NtSetContextThread( HANDLE handle, const CONTEXT *context )
if
(
ret
==
STATUS_PENDING
)
{
if
(
NtSuspendThread
(
handle
,
&
dummy
)
==
STATUS_SUCCESS
)
for
(
i
=
0
;
i
<
100
;
i
++
)
{
for
(
i
=
0
;
i
<
100
;
i
++
)
SERVER_START_REQ
(
set_thread_context
)
{
SERVER_START_REQ
(
set_thread_context
)
{
req
->
handle
=
wine_server_obj_handle
(
handle
);
req
->
suspend
=
0
;
wine_server_add_data
(
req
,
&
server_context
,
sizeof
(
server_context
)
);
ret
=
wine_server_call
(
req
);
}
SERVER_END_REQ
;
if
(
ret
==
STATUS_PENDING
)
{
LARGE_INTEGER
timeout
;
timeout
.
QuadPart
=
-
10000
;
NtDelayExecution
(
FALSE
,
&
timeout
);
}
else
break
;
req
->
handle
=
wine_server_obj_handle
(
handle
);
req
->
suspend
=
0
;
wine_server_add_data
(
req
,
&
server_context
,
sizeof
(
server_context
)
);
ret
=
wine_server_call
(
req
);
}
SERVER_END_REQ
;
if
(
ret
==
STATUS_PENDING
)
{
LARGE_INTEGER
timeout
;
timeout
.
QuadPart
=
-
10000
;
NtDelayExecution
(
FALSE
,
&
timeout
);
}
NtResumeThread
(
handle
,
&
dummy
)
;
else
break
;
}
NtResumeThread
(
handle
,
&
dummy
);
if
(
ret
==
STATUS_PENDING
)
ret
=
STATUS_ACCESS_DENIED
;
}
...
...
@@ -789,7 +786,7 @@ NTSTATUS WINAPI NtGetContextThread( HANDLE handle, CONTEXT *context )
{
req
->
handle
=
wine_server_obj_handle
(
handle
);
req
->
flags
=
server_flags
;
req
->
suspend
=
0
;
req
->
suspend
=
1
;
wine_server_set_reply
(
req
,
&
server_context
,
sizeof
(
server_context
)
);
ret
=
wine_server_call
(
req
);
self
=
reply
->
self
;
...
...
@@ -798,29 +795,26 @@ NTSTATUS WINAPI NtGetContextThread( HANDLE handle, CONTEXT *context )
if
(
ret
==
STATUS_PENDING
)
{
if
(
NtSuspendThread
(
handle
,
&
dummy
)
==
STATUS_SUCCESS
)
for
(
i
=
0
;
i
<
100
;
i
++
)
{
for
(
i
=
0
;
i
<
100
;
i
++
)
SERVER_START_REQ
(
get_thread_context
)
{
SERVER_START_REQ
(
get_thread_context
)
{
req
->
handle
=
wine_server_obj_handle
(
handle
);
req
->
flags
=
server_flags
;
req
->
suspend
=
0
;
wine_server_set_reply
(
req
,
&
server_context
,
sizeof
(
server_context
)
);
ret
=
wine_server_call
(
req
);
}
SERVER_END_REQ
;
if
(
ret
==
STATUS_PENDING
)
{
LARGE_INTEGER
timeout
;
timeout
.
QuadPart
=
-
10000
;
NtDelayExecution
(
FALSE
,
&
timeout
);
}
else
break
;
req
->
handle
=
wine_server_obj_handle
(
handle
);
req
->
flags
=
server_flags
;
req
->
suspend
=
0
;
wine_server_set_reply
(
req
,
&
server_context
,
sizeof
(
server_context
)
);
ret
=
wine_server_call
(
req
);
}
SERVER_END_REQ
;
if
(
ret
==
STATUS_PENDING
)
{
LARGE_INTEGER
timeout
;
timeout
.
QuadPart
=
-
10000
;
NtDelayExecution
(
FALSE
,
&
timeout
);
}
NtResumeThread
(
handle
,
&
dummy
)
;
else
break
;
}
NtResumeThread
(
handle
,
&
dummy
);
if
(
ret
==
STATUS_PENDING
)
ret
=
STATUS_ACCESS_DENIED
;
}
if
(
!
ret
)
ret
=
context_from_server
(
context
,
&
server_context
);
...
...
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