Alexandre Julliard : server:
Give system APCs priority over signaled objects.
Alexandre Julliard
julliard at wine.codeweavers.com
Tue May 1 07:39:34 CDT 2007
Module: wine
Branch: master
Commit: 48c53215861b07201a50c96226d455ee53cc2376
URL: http://source.winehq.org/git/wine.git/?a=commit;h=48c53215861b07201a50c96226d455ee53cc2376
Author: Alexandre Julliard <julliard at winehq.org>
Date: Tue May 1 14:07:24 2007 +0200
server: Give system APCs priority over signaled objects.
---
server/thread.c | 14 ++++++--------
1 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/server/thread.c b/server/thread.c
index b8aff71..c3a2535 100644
--- a/server/thread.c
+++ b/server/thread.c
@@ -497,15 +497,14 @@ static int check_wait( struct thread *thread )
struct thread_wait *wait = thread->wait;
struct wait_queue_entry *entry = wait->queues;
+ assert( wait );
+
+ if ((wait->flags & SELECT_INTERRUPTIBLE) && !list_empty( &thread->system_apc ))
+ return STATUS_USER_APC;
+
/* 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;
- }
+ if (thread->process->suspend + thread->suspend > 0) return -1;
- assert( wait );
if (wait->flags & SELECT_ALL)
{
int not_ok = 0;
@@ -535,7 +534,6 @@ static int check_wait( struct thread *thread )
}
other_checks:
- if ((wait->flags & SELECT_INTERRUPTIBLE) && !list_empty(&thread->system_apc)) return STATUS_USER_APC;
if ((wait->flags & SELECT_ALERTABLE) && !list_empty(&thread->user_apc)) return STATUS_USER_APC;
if (wait->timeout <= current_time) return STATUS_TIMEOUT;
return -1;
More information about the wine-cvs
mailing list