]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
rx: Always provide rxi_WaitForTQBusy
authorSimon Wilkinson <sxw@your-file-system.com>
Thu, 25 Oct 2012 11:01:04 +0000 (12:01 +0100)
committerDerrick Brashear <shadow@your-file-system.com>
Mon, 29 Oct 2012 20:32:20 +0000 (13:32 -0700)
Move the prototype for rxi_WaitForTQBusy to rx_internal.h, and always
provide it (as a prototype for RX_ENABLE_LOCKS, and as a no-op for lwp).

Remove all of the #ifdef RX_ENABLE_LOCKS around rxi_WaitForTQBusy calls.

Change-Id: I6c2b943d6d06bf19d3cb4495201d278e3900b6ef
Reviewed-on: http://gerrit.openafs.org/8294
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
src/rx/rx.c
src/rx/rx_internal.h
src/rx/rx_prototypes.h
src/rx/rx_rdwr.c

index e976ec31240b9c3e34afec2b7f2e0e4271d7aadb..2c8bf2685cf6e4475206348da828232e79ae0fcf 100644 (file)
@@ -5360,9 +5360,7 @@ rxi_ResetCall(struct rx_call *call, int newcall)
     MUTEX_EXIT(&peer->peer_lock);
 
     flags = call->flags;
-#ifdef RX_ENABLE_LOCKS
     rxi_WaitforTQBusy(call);
-#endif /* RX_ENABLE_LOCKS */
 
     rxi_ClearTransmitQueue(call, 1);
     if (call->tqWaiters || (flags & RX_CALL_TQ_WAIT)) {
index 777db2a2daf24ab8e12b8bd26468505d7916e6af..55dd11e55d484084b52b0a96a60a4f7eae63cd77 100644 (file)
@@ -53,6 +53,11 @@ extern void rxi_IncrementTimeAndCount(struct rx_peer *peer,
                                      afs_uint64 bytesSent,
                                      afs_uint64 bytesRcvd,
                                      int isServer);
+#ifdef RX_ENABLE_LOCKS
+extern void rxi_WaitforTQBusy(struct rx_call *call);
+#else
+# define rxi_WaitforTQBusy(call)
+#endif
 
 /* rx_packet.h */
 
index 9ff169c6439aa33a68a0b8ba00eb6fc33e78da87..27692e7feae6486547cca5080875d3b1056c5d49 100644 (file)
@@ -459,9 +459,6 @@ extern void rxi_PrepareSendPacket(struct rx_call *call,
 extern int rxi_AdjustIfMTU(int mtu);
 extern int rxi_AdjustMaxMTU(int mtu, int peerMaxMTU);
 extern int rxi_AdjustDgramPackets(int frags, int mtu);
-#ifdef RX_ENABLE_LOCKS
-extern void rxi_WaitforTQBusy(struct rx_call *call);
-#endif
 
 /* rxperf.c */
 
index 9e59c5c6994b15fc2719d60f6ede093a96e3e485..4af9ab7a0815c28a66bf8495ef9d15388b3383ba 100644 (file)
@@ -644,10 +644,8 @@ rxi_WriteProc(struct rx_call *call, char *buf,
                 * conn->securityMaxTrailerSize */
                call->app.bytesSent += call->app.currentPacket->length;
                rxi_PrepareSendPacket(call, call->app.currentPacket, 0);
-#ifdef RX_ENABLE_LOCKS
                 /* PrepareSendPacket drops the call lock */
                 rxi_WaitforTQBusy(call);
-#endif /* RX_ENABLE_LOCKS */
 #ifdef RX_TRACK_PACKETS
                call->app.currentPacket->flags |= RX_PKTFLAG_TQ;
 #endif
@@ -1037,9 +1035,7 @@ rxi_WritevProc(struct rx_call *call, struct iovec *iov, int nio, int nbytes)
     } else if (call->app.mode != RX_MODE_SENDING) {
        call->error = RX_PROTOCOL_ERROR;
     }
-#ifdef RX_ENABLE_LOCKS
     rxi_WaitforTQBusy(call);
-#endif /* RX_ENABLE_LOCKS */
 
     if (call->error) {
         call->app.mode = RX_MODE_ERROR;
@@ -1082,10 +1078,8 @@ rxi_WritevProc(struct rx_call *call, struct iovec *iov, int nio, int nbytes)
             * conn->securityMaxTrailerSize */
            call->app.bytesSent += call->app.currentPacket->length;
            rxi_PrepareSendPacket(call, call->app.currentPacket, 0);
-#ifdef RX_ENABLE_LOCKS
             /* PrepareSendPacket drops the call lock */
             rxi_WaitforTQBusy(call);
-#endif /* RX_ENABLE_LOCKS */
            opr_queue_Append(&tmpq, &call->app.currentPacket->entry);
 #ifdef RXDEBUG_PACKET
             tmpqc++;
@@ -1299,10 +1293,8 @@ rxi_FlushWrite(struct rx_call *call)
        /* The 1 specifies that this is the last packet */
        call->app.bytesSent += cp->length;
        rxi_PrepareSendPacket(call, cp, 1);
-#ifdef RX_ENABLE_LOCKS
         /* PrepareSendPacket drops the call lock */
         rxi_WaitforTQBusy(call);
-#endif /* RX_ENABLE_LOCKS */
 #ifdef RX_TRACK_PACKETS
        cp->flags |= RX_PKTFLAG_TQ;
 #endif