Commit 3ae370dc authored by Alexandre Julliard's avatar Alexandre Julliard

ntdll: Added a sleep in NtGet/SetContextThread, a yield is not enough on some kernels.

parent 80bbf583
...@@ -820,8 +820,13 @@ NTSTATUS WINAPI NtSetContextThread( HANDLE handle, const CONTEXT *context ) ...@@ -820,8 +820,13 @@ NTSTATUS WINAPI NtSetContextThread( HANDLE handle, const CONTEXT *context )
ret = wine_server_call( req ); ret = wine_server_call( req );
} }
SERVER_END_REQ; SERVER_END_REQ;
if (ret != STATUS_PENDING) break; if (ret == STATUS_PENDING)
NtYieldExecution(); {
LARGE_INTEGER timeout;
timeout.QuadPart = -10000;
NtDelayExecution( FALSE, &timeout );
}
else break;
} }
NtResumeThread( handle, &dummy ); NtResumeThread( handle, &dummy );
} }
...@@ -1110,8 +1115,13 @@ NTSTATUS WINAPI NtGetContextThread( HANDLE handle, CONTEXT *context ) ...@@ -1110,8 +1115,13 @@ NTSTATUS WINAPI NtGetContextThread( HANDLE handle, CONTEXT *context )
ret = wine_server_call( req ); ret = wine_server_call( req );
} }
SERVER_END_REQ; SERVER_END_REQ;
if (ret != STATUS_PENDING) break; if (ret == STATUS_PENDING)
NtYieldExecution(); {
LARGE_INTEGER timeout;
timeout.QuadPart = -10000;
NtDelayExecution( FALSE, &timeout );
}
else break;
} }
NtResumeThread( handle, &dummy ); NtResumeThread( handle, &dummy );
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment