Commit b9c62185 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

ntoskrnl.exe: Support event functions on kernel objects.

parent f57a383d
......@@ -224,7 +224,7 @@ POBJECT_TYPE ExEventObjectType = &event_type;
LONG WINAPI KeSetEvent( PRKEVENT event, KPRIORITY increment, BOOLEAN wait )
{
HANDLE handle;
ULONG ret = 0;
LONG ret = 0;
TRACE("event %p, increment %d, wait %u.\n", event, increment, wait);
......@@ -238,7 +238,11 @@ LONG WINAPI KeSetEvent( PRKEVENT event, KPRIORITY increment, BOOLEAN wait )
}
else
{
FIXME("unsupported on kernel objects\n");
if ((handle = kernel_object_handle( event, EVENT_MODIFY_STATE )))
{
NtSetEvent( handle, &ret );
NtClose( handle );
}
event->Header.SignalState = TRUE;
}
......@@ -251,7 +255,7 @@ LONG WINAPI KeSetEvent( PRKEVENT event, KPRIORITY increment, BOOLEAN wait )
LONG WINAPI KeResetEvent( PRKEVENT event )
{
HANDLE handle;
ULONG ret = 0;
LONG ret = 0;
TRACE("event %p.\n", event);
......@@ -265,7 +269,11 @@ LONG WINAPI KeResetEvent( PRKEVENT event )
}
else
{
FIXME("unsupported on kernel objects\n");
if ((handle = kernel_object_handle( event, EVENT_MODIFY_STATE )))
{
NtResetEvent( handle, &ret );
NtClose( handle );
}
event->Header.SignalState = FALSE;
}
......
......@@ -461,10 +461,8 @@ static void test_sync(void)
ok(ret == 0, "got %#x\n", ret);
KeResetEvent(event);
ret = wait_single(event, 0);
todo_wine
ok(ret == STATUS_TIMEOUT, "got %#x\n", ret);
ret = wait_single_handle(handle, 0);
todo_wine
ok(ret == STATUS_TIMEOUT, "got %#x\n", ret);
KeSetEvent(event, 0, FALSE);
......
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