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:
parent
a29204cb13
commit
469c2fd4d7
|
@ -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.@)
|
* KeSetPriorityThread (NTOSKRNL.EXE.@)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -125,3 +125,22 @@ void WINAPI KeInitializeEvent( PRKEVENT event, EVENT_TYPE type, BOOLEAN state )
|
||||||
event->Header.WaitListHead.Blink = NULL;
|
event->Header.WaitListHead.Blink = NULL;
|
||||||
event->Header.WaitListHead.Flink = 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;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue