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
2520e387
Commit
2520e387
authored
Jan 10, 2007
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Allow suspended threads to run system APCs.
parent
443a5dbd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
4 deletions
+12
-4
exception.c
dlls/ntdll/exception.c
+1
-1
thread.c
server/thread.c
+11
-3
No files found.
dlls/ntdll/exception.c
View file @
2520e387
...
...
@@ -161,7 +161,7 @@ void wait_suspend( CONTEXT *context )
/* wait with 0 timeout, will only return once the thread is no longer suspended */
timeout
.
QuadPart
=
0
;
NTDLL_wait_for_multiple_objects
(
0
,
NULL
,
0
,
&
timeout
,
0
);
NTDLL_wait_for_multiple_objects
(
0
,
NULL
,
SELECT_INTERRUPTIBLE
,
&
timeout
,
0
);
/* retrieve the new context */
SERVER_START_REQ
(
get_thread_context
)
...
...
server/thread.c
View file @
2520e387
...
...
@@ -470,8 +470,13 @@ static int check_wait( struct thread *thread )
struct
thread_wait
*
wait
=
thread
->
wait
;
struct
wait_queue_entry
*
entry
=
wait
->
queues
;
/* Suspended threads may not acquire locks */
if
(
thread
->
process
->
suspend
+
thread
->
suspend
>
0
)
return
-
1
;
/* Suspended threads may not acquire locks, but they can run system APCs */
if
(
thread
->
process
->
suspend
+
thread
->
suspend
>
0
)
{
if
((
wait
->
flags
&
SELECT_INTERRUPTIBLE
)
&&
!
list_empty
(
&
thread
->
system_apc
))
return
STATUS_USER_APC
;
return
-
1
;
}
assert
(
wait
);
if
(
wait
->
flags
&
SELECT_ALL
)
...
...
@@ -1077,6 +1082,7 @@ DECL_HANDLER(queue_apc)
DECL_HANDLER
(
get_apc
)
{
struct
thread_apc
*
apc
;
int
system_only
=
!
req
->
alertable
;
if
(
req
->
prev
)
{
...
...
@@ -1088,9 +1094,11 @@ DECL_HANDLER(get_apc)
release_object
(
apc
);
}
if
(
current
->
suspend
+
current
->
process
->
suspend
>
0
)
system_only
=
1
;
for
(;;)
{
if
(
!
(
apc
=
thread_dequeue_apc
(
current
,
!
req
->
alertable
)))
if
(
!
(
apc
=
thread_dequeue_apc
(
current
,
system_only
)))
{
/* no more APCs */
set_error
(
STATUS_PENDING
);
...
...
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