[Wine-patches] [6/6] [eter-2.0.0] ntoskrnl.exe: Slightly better hack for the KeWaitForSingleObject(NULL) case. (eterbug #8744)
Dmitry Timoshkov
dtimoshkov на etersoft.ru
Пн Окт 15 06:57:08 MSK 2012
---
dlls/ntoskrnl.exe/ntoskrnl.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c
index c1fa8c1..4081b4c 100644
--- a/dlls/ntoskrnl.exe/ntoskrnl.c
+++ b/dlls/ntoskrnl.exe/ntoskrnl.c
@@ -2527,8 +2527,8 @@ PLIST_ENTRY WINAPI ExfInterlockedRemoveHeadList( PLIST_ENTRY ListHead,
NTSTATUS WINAPI KeDelayExecutionThread ( KPROCESSOR_MODE WaitMode,
BOOLEAN Alertable, PLARGE_INTEGER Interval )
{
- TRACE( "stub: %d %d %p\n", WaitMode, Alertable, Interval );
- return STATUS_SUCCESS;
+ TRACE( "%d %d %p\n", WaitMode, Alertable, Interval );
+ return NtDelayExecution( Alertable, Interval );
}
/***********************************************************************
@@ -2775,8 +2775,14 @@ NTSTATUS WINAPI KeWaitForSingleObject( PVOID Object, KWAIT_REASON WaitReason,
if (!Object)
{
- ZwYieldExecution();
- return STATUS_SUCCESS;
+ LARGE_INTEGER delay;
+ if (!Timeout)
+ {
+ Timeout = &delay;
+ delay.QuadPart = 1000;
+ }
+ FIXME("Yielding, timeout %s\n", wine_dbgstr_longlong(Timeout->QuadPart));
+ return KeDelayExecutionThread( WaitMode, Alertable, Timeout );
}
switch (header->Type)
--
1.7.12.3
Подробная информация о списке рассылки Wine-patches