[Wine-patches] [5/6] [eter-2.0.0] ntoskrnl.exe: Make KeWaitForSingleObject yield execution to another thread if there is nothing to wait on. (eterbug #8744)
Dmitry Timoshkov
dtimoshkov на etersoft.ru
Пн Окт 15 06:57:01 MSK 2012
---
dlls/ntoskrnl.exe/ntoskrnl.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c
index 8d4a6d1..c1fa8c1 100644
--- a/dlls/ntoskrnl.exe/ntoskrnl.c
+++ b/dlls/ntoskrnl.exe/ntoskrnl.c
@@ -2773,7 +2773,11 @@ NTSTATUS WINAPI KeWaitForSingleObject( PVOID Object, KWAIT_REASON WaitReason,
TRACE("%p %u %d %d %p\n", Object, WaitReason, WaitMode, Alertable, Timeout);
- if (!Object) return STATUS_INVALID_PARAMETER;
+ if (!Object)
+ {
+ ZwYieldExecution();
+ return STATUS_SUCCESS;
+ }
switch (header->Type)
{
--
1.7.12.3
Подробная информация о списке рассылки Wine-patches