ntoskrnl.exe: Implement KeCancelTimer().

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-27 19:43:07 -06:00 committed by Alexandre Julliard
parent 55778f4d8a
commit fc230cd4e3
3 changed files with 18 additions and 1 deletions

View File

@ -517,7 +517,7 @@
@ stub KeAttachProcess
@ stub KeBugCheck
@ stub KeBugCheckEx
@ stub KeCancelTimer
@ stdcall KeCancelTimer(ptr)
@ stub KeCapturePersistentThreadState
@ stdcall KeClearEvent(ptr)
@ stub KeConnectInterrupt

View File

@ -348,3 +348,19 @@ BOOLEAN WINAPI KeSetTimerEx( KTIMER *timer, LARGE_INTEGER duetime, LONG period,
return ret;
}
BOOLEAN WINAPI KeCancelTimer( KTIMER *timer )
{
BOOL ret;
TRACE("timer %p.\n", timer);
EnterCriticalSection( &sync_cs );
ret = timer->Header.Inserted;
timer->Header.Inserted = FALSE;
CloseHandle(timer->Header.WaitListHead.Blink);
timer->Header.WaitListHead.Blink = NULL;
LeaveCriticalSection( &sync_cs );
return ret;
}

View File

@ -1419,6 +1419,7 @@ void WINAPI IoReleaseCancelSpinLock(KIRQL);
NTSTATUS WINAPI IoSetDeviceInterfaceState(UNICODE_STRING*,BOOLEAN);
NTSTATUS WINAPI IoWMIRegistrationControl(PDEVICE_OBJECT,ULONG);
BOOLEAN WINAPI KeCancelTimer(KTIMER*);
void WINAPI KeClearEvent(PRKEVENT);
PKTHREAD WINAPI KeGetCurrentThread(void);
void WINAPI KeInitializeEvent(PRKEVENT,EVENT_TYPE,BOOLEAN);