[Wine-patches] [eterhack] ntoskrnl.exe: Slightly better hack for the KeWaitForSingleObject(NULL) case.

Dmitry Timoshkov dtimoshkov на etersoft.ru
Ср Окт 3 13:22:56 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 09068ee..ab466f9 100644
--- a/dlls/ntoskrnl.exe/ntoskrnl.c
+++ b/dlls/ntoskrnl.exe/ntoskrnl.c
@@ -2558,8 +2558,8 @@ PRKTHREAD WINAPI KeGetCurrentThread(void)
 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 );
 }
 
 
@@ -2800,8 +2800,14 @@ NTSTATUS WINAPI KeWaitForSingleObject(PVOID Object,
 
     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.1



Подробная информация о списке рассылки Wine-patches