rx: Remove delays in multi_End_Ignore
[openafs.git] / src / rx / rx_multi.h
index 82fb38f..80bf1ec 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright 2000, International Business Machines Corporation and others.
  * All Rights Reserved.
- * 
+ *
  * This software has been released under the terms of the IBM Public
  * License.  For details, see the LICENSE file in the top-level source
  * directory or online at http://www.openafs.org/dl/license10.html
@@ -25,22 +25,28 @@ struct multi_handle {
 
 #define multi_Rx(conns, nConns) \
     do {\
-       register struct multi_handle *multi_h;\
-       register int multi_i;\
-       register struct rx_call *multi_call;\
+       struct multi_handle *multi_h;\
+       int multi_i;\
+       int multi_i0;\
+       afs_int32 multi_error;\
+       struct rx_call *multi_call;\
        multi_h = multi_Init(conns, nConns);\
-       for (multi_i = 0; multi_i < nConns; multi_i++)
+       for (multi_i0 = multi_i = 0; ; multi_i = multi_i0 )
 
 #define multi_Body(startProc, endProc)\
-       multi_call = multi_h->calls[multi_i];\
-       startProc;\
-       rx_FlushWrite(multi_call);\
-       }\
-       while ((multi_i = multi_Select(multi_h)) >= 0) {\
-           register afs_int32 multi_error;\
+       if (multi_h->nextReady == multi_h->firstNotReady && multi_i < multi_h->nConns) {\
            multi_call = multi_h->calls[multi_i];\
-           multi_error = rx_EndCall(multi_call, endProc);\
-           multi_h->calls[multi_i] = (struct rx_call *) 0
+            if (multi_call) {\
+                startProc;\
+               rx_FlushWrite(multi_call);\
+            }\
+           multi_i0++;  /* THIS is the loop variable!! */\
+           continue;\
+       }\
+       if ((multi_i = multi_Select(multi_h)) < 0) break;\
+       multi_call = multi_h->calls[multi_i];\
+       multi_error = rx_EndCall(multi_call, endProc);\
+       multi_h->calls[multi_i] = (struct rx_call *) 0
 
 #define        multi_Abort break
 
@@ -48,9 +54,7 @@ struct multi_handle {
        multi_Finalize(multi_h);\
     } while (0)
 
-/* Ignore remaining multi RPC's */
-#define multi_End_Ignore\
-       multi_Finalize_Ignore(multi_h);\
-    } while (0)
+/* Deprecated; use multi_End instead. */
+#define multi_End_Ignore multi_End
 
 #endif /* _RX_MULTI_     End of rx_multi.h */