Allow user APCs with NULL 'func' (just wake up the thread).
This commit is contained in:
parent
7761cbe0b6
commit
f6461fe290
|
@ -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;
|
||||
|
|
|
@ -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) )))
|
||||
|
|
Loading…
Reference in New Issue