Wait for the object multiple times until TIMEOUT is met.

This commit is contained in:
Uwe Bonnes 2005-07-11 14:23:24 +00:00 committed by Alexandre Julliard
parent 630c6ea6fd
commit 38eb243bc1
1 changed files with 10 additions and 2 deletions

View File

@ -535,7 +535,11 @@ NTSTATUS WINAPI NtReadFile(HANDLE hFile, HANDLE hEvent,
}
if (flags & FD_FLAG_TIMEOUT)
{
ret = NtWaitForSingleObject(hEvent, TRUE, NULL);
do
{
ret = NtWaitForSingleObject(hEvent, TRUE, NULL);
}
while (ret == STATUS_USER_APC && io_status->u.Status == STATUS_PENDING);
NtClose(hEvent);
if (ret != STATUS_USER_APC)
fileio->queue_apc_on_error = 1;
@ -748,7 +752,11 @@ NTSTATUS WINAPI NtWriteFile(HANDLE hFile, HANDLE hEvent,
}
if (flags & FD_FLAG_TIMEOUT)
{
ret = NtWaitForSingleObject(hEvent, TRUE, NULL);
do
{
ret = NtWaitForSingleObject(hEvent, TRUE, NULL);
}
while (ret == STATUS_USER_APC && io_status->u.Status == STATUS_PENDING);
NtClose(hEvent);
if (ret != STATUS_USER_APC)
fileio->queue_apc_on_error = 1;