From f6461fe290e0546c99cc537b92145bd2e83bc672 Mon Sep 17 00:00:00 2001 From: Ulrich Weigand Date: Sun, 11 Apr 1999 15:02:18 +0000 Subject: [PATCH] Allow user APCs with NULL 'func' (just wake up the thread). --- scheduler/synchro.c | 2 +- server/thread.c | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/scheduler/synchro.c b/scheduler/synchro.c index 8c82f40b343..ec73de73271 100644 --- a/scheduler/synchro.c +++ b/scheduler/synchro.c @@ -106,7 +106,7 @@ DWORD WINAPI WaitForMultipleObjectsEx( DWORD count, const HANDLE *handles, for (i = 0; i < len / sizeof(void*); i += 2) { PAPCFUNC func = (PAPCFUNC)apc[i]; - func( (ULONG_PTR)apc[i+1] ); + if ( func ) func( (ULONG_PTR)apc[i+1] ); } } return reply.signaled; diff --git a/server/thread.c b/server/thread.c index 9af06acf406..bf8a2ca19bf 100644 --- a/server/thread.c +++ b/server/thread.c @@ -482,11 +482,6 @@ void wake_up( struct object *obj, int max ) int thread_queue_apc( struct thread *thread, void *func, void *param ) { struct thread_apc *apc; - if (!func) - { - SET_ERROR( ERROR_INVALID_PARAMETER ); - return 0; - } if (!thread->apc) { if (!(thread->apc = mem_alloc( MAX_THREAD_APC * sizeof(*apc) ))) -- 2.11.4.GIT