From: Jacek Caban Subject: [PATCH 04/12] server: Don't call wake_thread in queue_apc for current thread. Message-Id: <88c5b740-e665-030f-57cf-e124bc42b83f@codeweavers.com> Date: Tue, 13 Jun 2017 16:47:43 +0200 This allows queuing user APCs inside of satisfied() implementation. Signed-off-by: Jacek Caban --- server/thread.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/thread.c b/server/thread.c index 10a5bf14b6..16b8a671ff 100644 --- a/server/thread.c +++ b/server/thread.c @@ -969,7 +969,7 @@ static int queue_apc( struct process *process, struct thread *thread, struct thr grab_object( apc ); list_add_tail( queue, &apc->entry ); - if (!list_prev( queue, &apc->entry )) /* first one */ + if (!list_prev( queue, &apc->entry ) && thread != current) /* first one */ wake_thread( thread ); return 1;