From 09468649a0f94bb3a9ba886914e69959be82e5ce Mon Sep 17 00:00:00 2001 From: short <> Date: Sat, 6 Dec 2003 19:00:25 +0000 Subject: [PATCH] +KeDelayExecutionThread(). - Needed for proper volume dismount by ntfs.sys of NT-5.1sp1. --- src/libcaptive/ke/exports.captivesym | 2 +- src/libcaptive/ke/timer.c | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/src/libcaptive/ke/exports.captivesym b/src/libcaptive/ke/exports.captivesym index 75467bb..be022a0 100644 --- a/src/libcaptive/ke/exports.captivesym +++ b/src/libcaptive/ke/exports.captivesym @@ -277,7 +277,7 @@ ntoskrnl.exe IoCheckEaBufferValidity undef ntoskrnl.exe IoGetFileObjectGenericMapping ntoskrnl.exe IoIsSystemThread ntoskrnl.exe IoRaiseInformationalHardError undef -ntoskrnl.exe KeDelayExecutionThread undef +ntoskrnl.exe KeDelayExecutionThread ntoskrnl.exe KeSetTimer ntoskrnl.exe ProbeForRead undef ntoskrnl.exe ProbeForWrite undef diff --git a/src/libcaptive/ke/timer.c b/src/libcaptive/ke/timer.c index f9c371f..c4f9ab6 100644 --- a/src/libcaptive/ke/timer.c +++ b/src/libcaptive/ke/timer.c @@ -117,3 +117,31 @@ VOID KeInitializeTimer(PKTIMER Timer) /* NOP */ } + + +/** + * KeDelayExecutionThread: + * @WaitMode: Processor mode in which the caller is waiting. + * libcaptive requires %KernelMode value. + * @Altertable: Specifies if the wait is alertable. + * libcaptive requires %FALSE value. + * @Interval: Specifies the interval to wait. + * Pointer %NULL is forbidden. + * libcaptive ignores the value. + * + * Function puts the current thread into an alertable or nonalertable wait + * state for a given internal. libcaptive never waits. + * + * Returns: libcaptive returns %STATUS_SUCCESS (interval passed). + */ +NTSTATUS KeDelayExecutionThread(KPROCESSOR_MODE WaitMode,BOOLEAN Alertable,PLARGE_INTEGER Interval) +{ + g_return_val_if_fail(WaitMode==KernelMode,STATUS_INVALID_PARAMETER); + g_return_val_if_fail(Alertable==FALSE,STATUS_INVALID_PARAMETER); + g_return_val_if_fail(Interval!=NULL,STATUS_INVALID_PARAMETER); + + g_log(G_LOG_DOMAIN,G_LOG_LEVEL_DEBUG,"%s: Interval=%lld, returning STATUS_SUCCESS",G_STRLOC, + (long long)Interval->QuadPart); + + return STATUS_SUCCESS; +} -- 1.8.3.1