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

This commit is contained in:
Alexandre Julliard 2007-12-03 13:55:25 +01:00
parent 80bbf58378
commit 3ae370dc71
1 changed files with 14 additions and 4 deletions

View File

@ -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 )
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 );
} }