From ce5aa07ac893aa38e72bb82c3e6dd2496ef4e1f5 Mon Sep 17 00:00:00 2001
From: Alexander Morozov <amorozov@etersoft.ru>
Date: Sat, 31 Jan 2015 12:17:54 +0100
Subject: ntoskrnl.exe: Add stub for KeDelayExecutionThread.

---
 dlls/ntoskrnl.exe/ntoskrnl.c        | 13 +++++++++++++
 dlls/ntoskrnl.exe/ntoskrnl.exe.spec |  2 +-
 include/ddk/wdm.h                   |  1 +
 3 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c
index 0d6f730..c90b351 100644
--- a/dlls/ntoskrnl.exe/ntoskrnl.c
+++ b/dlls/ntoskrnl.exe/ntoskrnl.c
@@ -1308,6 +1308,19 @@ PRKTHREAD WINAPI KeGetCurrentThread(void)
     return NULL;
 }
 
+
+/***********************************************************************
+ *           KeDelayExecutionThread   (NTOSKRNL.EXE.@)
+ */
+NTSTATUS WINAPI KeDelayExecutionThread(KPROCESSOR_MODE WaitMode, BOOLEAN Alertable,
+                                       PLARGE_INTEGER Interval)
+{
+    FIXME("(%d, %d, %p): stub\n", WaitMode, Alertable, Interval);
+
+    return STATUS_SUCCESS;
+}
+
+
 /***********************************************************************
  *           KeInitializeEvent   (NTOSKRNL.EXE.@)
  */
diff --git a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec
index 25624a6..bae3678 100644
--- a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec
+++ b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec
@@ -518,7 +518,7 @@
 @ stub KeClearEvent
 @ stub KeConnectInterrupt
 @ stub KeDcacheFlushCount
-@ stub KeDelayExecutionThread
+@ stdcall KeDelayExecutionThread(long long ptr)
 @ stub KeDeregisterBugCheckCallback
 @ stub KeDeregisterBugCheckReasonCallback
 @ stub KeDetachProcess
diff --git a/include/ddk/wdm.h b/include/ddk/wdm.h
index f2eb6a5..0d13337 100644
--- a/include/ddk/wdm.h
+++ b/include/ddk/wdm.h
@@ -1219,6 +1219,7 @@ void      WINAPI IoInitializeIrp(IRP*,USHORT,CCHAR);
 VOID      WINAPI IoInitializeRemoveLockEx(PIO_REMOVE_LOCK,ULONG,ULONG,ULONG,ULONG);
 NTSTATUS  WINAPI IoWMIRegistrationControl(PDEVICE_OBJECT,ULONG);
 
+NTSTATUS  WINAPI KeDelayExecutionThread(KPROCESSOR_MODE,BOOLEAN,PLARGE_INTEGER);
 PKTHREAD  WINAPI KeGetCurrentThread(void);
 void      WINAPI KeQuerySystemTime(LARGE_INTEGER*);
 void      WINAPI KeQueryTickCount(LARGE_INTEGER*);
-- 
2.2.2

