ntdll: Added a sleep in NtGet/SetContextThread, a yield is not enough on some kernels.
This commit is contained in:
parent
80bbf58378
commit
3ae370dc71
|
@ -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 );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue