From: Simon Wilkinson Date: Thu, 25 Oct 2012 11:01:04 +0000 (+0100) Subject: rx: Always provide rxi_WaitForTQBusy X-Git-Tag: upstream/1.8.0_pre1^2~1866 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=8e118de45cdf9987845d8d127c3c45cf1b77f01f;p=packages%2Fo%2Fopenafs.git rx: Always provide rxi_WaitForTQBusy 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 Tested-by: BuildBot Reviewed-by: Derrick Brashear --- diff --git a/src/rx/rx.c b/src/rx/rx.c index e976ec312..2c8bf2685 100644 --- a/src/rx/rx.c +++ b/src/rx/rx.c @@ -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)) { diff --git a/src/rx/rx_internal.h b/src/rx/rx_internal.h index 777db2a2d..55dd11e55 100644 --- a/src/rx/rx_internal.h +++ b/src/rx/rx_internal.h @@ -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 */ diff --git a/src/rx/rx_prototypes.h b/src/rx/rx_prototypes.h index 9ff169c64..27692e7fe 100644 --- a/src/rx/rx_prototypes.h +++ b/src/rx/rx_prototypes.h @@ -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 */ diff --git a/src/rx/rx_rdwr.c b/src/rx/rx_rdwr.c index 9e59c5c69..4af9ab7a0 100644 --- a/src/rx/rx_rdwr.c +++ b/src/rx/rx_rdwr.c @@ -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