[ros-diffs] [ion] 17187: Fix horridly wrong SignalObjectAndWait return values, should make more wine tests pass

ion at svn.reactos.com ion at svn.reactos.com
Mon Aug 8 01:18:52 CEST 2005


Fix horridly wrong SignalObjectAndWait return values, should make more
wine tests pass
Modified: trunk/reactos/lib/kernel32/synch/wait.c
  _____  

Modified: trunk/reactos/lib/kernel32/synch/wait.c
--- trunk/reactos/lib/kernel32/synch/wait.c	2005-08-07 23:08:07 UTC
(rev 17186)
+++ trunk/reactos/lib/kernel32/synch/wait.c	2005-08-07 23:18:40 UTC
(rev 17187)
@@ -266,7 +266,7 @@

 	{
 	  DPRINT1("Console handles are not supported yet!\n");
 	  SetLastError(ERROR_INVALID_HANDLE);
-	  return FALSE;
+	  return WAIT_FAILED;
 	}
     }
 
@@ -280,6 +280,7 @@
       TimePtr = &Time;
     }
 
+WaitAgain:
   Status = NtSignalAndWaitForSingleObject (hObjectToSignal,
 					   hObjectToWaitOn,
 					   (BOOLEAN)bAlertable,
@@ -287,10 +288,12 @@
   if (!NT_SUCCESS(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 */
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.reactos.org/pipermail/ros-diffs/attachments/20050808/ff4d7bce/attachment.html


More information about the Ros-diffs mailing list