do {
if (call->nFree == 0) {
MUTEX_ENTER(&call->lock);
-#ifdef AFS_GLOBAL_RXLOCK_KERNEL
- rxi_WaitforTQBusy(call);
-#endif /* AFS_GLOBAL_RXLOCK_KERNEL */
cp = call->currentPacket;
if (call->error)
call->mode = RX_MODE_ERROR;
* conn->securityMaxTrailerSize */
hadd32(call->bytesSent, cp->length);
rxi_PrepareSendPacket(call, cp, 0);
+#ifdef AFS_GLOBAL_RXLOCK_KERNEL
+ /* PrepareSendPacket drops the call lock */
+ rxi_WaitforTQBusy(call);
+#endif /* AFS_GLOBAL_RXLOCK_KERNEL */
#ifdef RX_TRACK_PACKETS
cp->flags |= RX_PKTFLAG_TQ;
#endif
* conn->securityMaxTrailerSize */
hadd32(call->bytesSent, cp->length);
rxi_PrepareSendPacket(call, cp, 0);
+#ifdef AFS_GLOBAL_RXLOCK_KERNEL
+ /* PrepareSendPacket drops the call lock */
+ rxi_WaitforTQBusy(call);
+#endif /* AFS_GLOBAL_RXLOCK_KERNEL */
queue_Append(&tmpq, cp);
#ifdef RXDEBUG_PACKET
tmpqc++;
#endif
MUTEX_ENTER(&call->lock);
-#ifdef AFS_GLOBAL_RXLOCK_KERNEL
- rxi_WaitforTQBusy(call);
-#endif /* AFS_GLOBAL_RXLOCK_KERNEL */
if (call->error)
call->mode = RX_MODE_ERROR;
/* The 1 specifies that this is the last packet */
hadd32(call->bytesSent, cp->length);
rxi_PrepareSendPacket(call, cp, 1);
+#ifdef AFS_GLOBAL_RXLOCK_KERNEL
+ /* PrepareSendPacket drops the call lock */
+ rxi_WaitforTQBusy(call);
+#endif /* AFS_GLOBAL_RXLOCK_KERNEL */
#ifdef RX_TRACK_PACKETS
cp->flags |= RX_PKTFLAG_TQ;
#endif