mirror of
https://github.com/reactos/reactos.git
synced 2024-12-29 02:25:17 +00:00
Fix horridly wrong SignalObjectAndWait return values, should make more wine tests pass
svn path=/trunk/; revision=17187
This commit is contained in:
parent
bad46dca35
commit
7905e74e59
1 changed files with 6 additions and 3 deletions
|
@ -266,7 +266,7 @@ SignalObjectAndWait(HANDLE hObjectToSignal,
|
||||||
{
|
{
|
||||||
DPRINT1("Console handles are not supported yet!\n");
|
DPRINT1("Console handles are not supported yet!\n");
|
||||||
SetLastError(ERROR_INVALID_HANDLE);
|
SetLastError(ERROR_INVALID_HANDLE);
|
||||||
return FALSE;
|
return WAIT_FAILED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -280,6 +280,7 @@ SignalObjectAndWait(HANDLE hObjectToSignal,
|
||||||
TimePtr = &Time;
|
TimePtr = &Time;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
WaitAgain:
|
||||||
Status = NtSignalAndWaitForSingleObject (hObjectToSignal,
|
Status = NtSignalAndWaitForSingleObject (hObjectToSignal,
|
||||||
hObjectToWaitOn,
|
hObjectToWaitOn,
|
||||||
(BOOLEAN)bAlertable,
|
(BOOLEAN)bAlertable,
|
||||||
|
@ -287,10 +288,12 @@ SignalObjectAndWait(HANDLE hObjectToSignal,
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
SetLastErrorByStatus (Status);
|
SetLastErrorByStatus (Status);
|
||||||
return FALSE;
|
return WAIT_FAILED;
|
||||||
}
|
}
|
||||||
|
if (Status == STATUS_ALERTED && bAlertable) goto WaitAgain;
|
||||||
|
|
||||||
return TRUE;
|
/* STATUS_SUCCESS maps to WAIT_OBJECT_0 */
|
||||||
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* EOF */
|
/* EOF */
|
||||||
|
|
Loading…
Reference in a new issue