Commit 469c2fd4 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

ntoskrnl.exe: Implement KeSetEvent().

parent a29204cb
......@@ -2440,16 +2440,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.@)
*/
KPRIORITY WINAPI KeSetPriorityThread( PKTHREAD Thread, KPRIORITY Priority )
......
......@@ -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;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment