Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/ntoskrnl.exe/ntoskrnl.c | 10 ---------- dlls/ntoskrnl.exe/sync.c | 19 +++++++++++++++++++ 2 files changed, 19 insertions(+), 10 deletions(-)
diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c index 189f303d6a..e6ca5e9ace 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/ntoskrnl.c @@ -2429,16 +2429,6 @@ ULONG WINAPI KeQueryTimeIncrement(void) }
-/*********************************************************************** - * KeResetEvent (NTOSKRNL.EXE.@) - */ -LONG WINAPI KeResetEvent( PRKEVENT Event ) -{ - FIXME("(%p): stub\n", Event); - return 0; -} - - /*********************************************************************** * KeSetPriorityThread (NTOSKRNL.EXE.@) */ diff --git a/dlls/ntoskrnl.exe/sync.c b/dlls/ntoskrnl.exe/sync.c index 05d50ef648..f011a6009a 100644 --- a/dlls/ntoskrnl.exe/sync.c +++ b/dlls/ntoskrnl.exe/sync.c @@ -146,3 +146,22 @@ LONG WINAPI KeSetEvent( PRKEVENT event, KPRIORITY increment, BOOLEAN wait )
return ret; } + +/*********************************************************************** + * KeResetEvent (NTOSKRNL.EXE.@) + */ +LONG WINAPI KeResetEvent( PRKEVENT event ) +{ + HANDLE handle = event->Header.WaitListHead.Blink; + LONG ret; + + TRACE("event %p.\n", event); + + EnterCriticalSection( &sync_cs ); + ret = interlocked_xchg( &event->Header.SignalState, FALSE ); + if (handle) + ResetEvent( handle ); + LeaveCriticalSection( &sync_cs ); + + return ret; +}