ntoskrnl.exe: Implement KeSetEvent().

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2018-11-24 22:34:40 -06:00 committed by Alexandre Julliard
parent a29204cb13
commit 469c2fd4d7
2 changed files with 19 additions and 10 deletions

View File

@ -2439,16 +2439,6 @@ LONG WINAPI KeResetEvent( PRKEVENT Event )
}
/***********************************************************************
* KeSetEvent (NTOSKRNL.EXE.@)
*/
LONG WINAPI KeSetEvent( PRKEVENT Event, KPRIORITY Increment, BOOLEAN Wait )
{
FIXME("(%p, %d, %d): stub\n", Event, Increment, Wait);
return 0;
}
/***********************************************************************
* KeSetPriorityThread (NTOSKRNL.EXE.@)
*/

View File

@ -125,3 +125,22 @@ void WINAPI KeInitializeEvent( PRKEVENT event, EVENT_TYPE type, BOOLEAN state )
event->Header.WaitListHead.Blink = NULL;
event->Header.WaitListHead.Flink = NULL;
}
/***********************************************************************
* KeSetEvent (NTOSKRNL.EXE.@)
*/
LONG WINAPI KeSetEvent( PRKEVENT event, KPRIORITY increment, BOOLEAN wait )
{
HANDLE handle = event->Header.WaitListHead.Blink;
LONG ret;
TRACE("event %p, increment %d, wait %u.\n", event, increment, wait);
EnterCriticalSection( &sync_cs );
ret = InterlockedExchange( &event->Header.SignalState, TRUE );
if (handle)
SetEvent( handle );
LeaveCriticalSection( &sync_cs );
return ret;
}