No longer call WaitFor*Object* from ntdll (but NtWait*Object*).

diff --git a/dlls/ntdll/critsection.c b/dlls/ntdll/critsection.c
index 023323a..a0083b5 100644
--- a/dlls/ntdll/critsection.c
+++ b/dlls/ntdll/critsection.c
@@ -146,23 +146,28 @@
     {
         EXCEPTION_RECORD rec;
         HANDLE sem = get_semaphore( crit );
+        LARGE_INTEGER time;
+        DWORD status;
 
-        DWORD res = WaitForSingleObject( sem, 5000L );
-        if ( res == WAIT_TIMEOUT )
+        time.QuadPart = -5000 * 10000;  /* 5 seconds */
+        status = NtWaitForSingleObject( sem, FALSE, &time );
+        if ( status == WAIT_TIMEOUT )
         {
             const char *name = (char *)crit->DebugInfo;
             if (!name) name = "?";
             ERR( "section %p %s wait timed out, retrying (60 sec) tid=%04lx\n",
                  crit, debugstr_a(name), GetCurrentThreadId() );
-            res = WaitForSingleObject( sem, 60000L );
-            if ( res == WAIT_TIMEOUT && TRACE_ON(relay) )
+            time.QuadPart = -60000 * 10000;
+            status = NtWaitForSingleObject( sem, FALSE, &time );
+            if ( status == WAIT_TIMEOUT && TRACE_ON(relay) )
             {
                 ERR( "section %p %s wait timed out, retrying (5 min) tid=%04lx\n",
                      crit, debugstr_a(name), GetCurrentThreadId() );
-                res = WaitForSingleObject( sem, 300000L );
+                time.QuadPart = -300000 * (ULONGLONG)10000;
+                status = NtWaitForSingleObject( sem, FALSE, &time );
             }
         }
-        if (res == STATUS_WAIT_0) return STATUS_SUCCESS;
+        if (status == STATUS_WAIT_0) return STATUS_SUCCESS;
 
         /* Throw exception only for Wine internal locks */
         if (!crit->DebugInfo) continue;
diff --git a/dlls/ntdll/rtl.c b/dlls/ntdll/rtl.c
index 54088c7..3f92dc9 100644
--- a/dlls/ntdll/rtl.c
+++ b/dlls/ntdll/rtl.c
@@ -166,7 +166,7 @@
 	     rwl->uExclusiveWaiters++;
 
 	     RtlLeaveCriticalSection( &rwl->rtlCS );
-	     if( WaitForSingleObject( rwl->hExclusiveReleaseSemaphore, INFINITE ) == WAIT_FAILED )
+	     if( NtWaitForSingleObject( rwl->hExclusiveReleaseSemaphore, FALSE, NULL ) == WAIT_FAILED )
 		 goto done;
 	     goto start; /* restart the acquisition to avoid deadlocks */
 	 }
@@ -206,7 +206,7 @@
 	{
 	    rwl->uSharedWaiters++;
 	    RtlLeaveCriticalSection( &rwl->rtlCS );
-	    if( (dwWait = WaitForSingleObject( rwl->hSharedReleaseSemaphore, INFINITE )) == WAIT_FAILED )
+	    if( (dwWait = NtWaitForSingleObject( rwl->hSharedReleaseSemaphore, FALSE, NULL )) == WAIT_FAILED )
 		goto done;
 	    goto start;
 	}
diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c
index f3511d9..1ddf6f7 100644
--- a/dlls/ntdll/signal_i386.c
+++ b/dlls/ntdll/signal_i386.c
@@ -1125,9 +1125,12 @@
  */
 static HANDLER_DEF(usr1_handler)
 {
+    LARGE_INTEGER timeout;
+
     init_handler( HANDLER_CONTEXT );
     /* wait with 0 timeout, will only return once the thread is no longer suspended */
-    WaitForMultipleObjectsEx( 0, NULL, FALSE, 0, FALSE );
+    timeout.QuadPart = 0;
+    NtWaitForMultipleObjects( 0, NULL, FALSE, FALSE, &timeout );
 }
 
 
diff --git a/dlls/ntdll/signal_powerpc.c b/dlls/ntdll/signal_powerpc.c
index ee3a52c..f9fce74 100644
--- a/dlls/ntdll/signal_powerpc.c
+++ b/dlls/ntdll/signal_powerpc.c
@@ -409,8 +409,11 @@
  */
 static HANDLER_DEF(usr1_handler)
 {
+    LARGE_INTEGER timeout;
+
     /* wait with 0 timeout, will only return once the thread is no longer suspended */
-    WaitForMultipleObjectsEx( 0, NULL, FALSE, 0, FALSE );
+    timeout.QuadPart = 0;
+    NtWaitForMultipleObjects( 0, NULL, FALSE, FALSE, &timeout );
 }
 
 
diff --git a/dlls/ntdll/signal_sparc.c b/dlls/ntdll/signal_sparc.c
index 3019e8b..4807198 100644
--- a/dlls/ntdll/signal_sparc.c
+++ b/dlls/ntdll/signal_sparc.c
@@ -384,8 +384,11 @@
  */
 static HANDLER_DEF(usr1_handler)
 {
+    LARGE_INTEGER timeout;
+
     /* wait with 0 timeout, will only return once the thread is no longer suspended */
-    WaitForMultipleObjectsEx( 0, NULL, FALSE, 0, FALSE );
+    timeout.QuadPart = 0;
+    NtWaitForMultipleObjects( 0, NULL, FALSE, FALSE, &timeout );
 }