rx-junk-writevinit-20021030
[openafs.git] / src / rx / rx_rdwr.c
index 9c10269..ea2cd60 100644 (file)
@@ -9,7 +9,7 @@
 
 #include <afsconfig.h>
 #ifdef KERNEL
-#include "../afs/param.h"
+#include "afs/param.h"
 #else
 #include <afs/param.h>
 #endif
@@ -19,42 +19,42 @@ RCSID("$Header$");
 #ifdef KERNEL
 #ifndef UKERNEL
 #if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
-#include "../afs/sysincludes.h"
+#include "afs/sysincludes.h"
 #else
-#include "../h/types.h"
-#include "../h/time.h"
-#include "../h/stat.h"
+#include "h/types.h"
+#include "h/time.h"
+#include "h/stat.h"
 #ifdef AFS_OSF_ENV
 #include <net/net_globals.h>
 #endif /* AFS_OSF_ENV */
 #ifdef AFS_LINUX20_ENV
-#include "../h/socket.h"
+#include "h/socket.h"
 #endif
-#include "../netinet/in.h"
+#include "netinet/in.h"
 #if defined(AFS_SGI_ENV)
-#include "../afs/sysincludes.h"
+#include "afs/sysincludes.h"
 #endif
 #endif
-#include "../afs/afs_args.h"
-#include "../afs/afs_osi.h"
+#include "afs/afs_args.h"
+#include "afs/afs_osi.h"
 #if    (defined(AFS_AUX_ENV) || defined(AFS_AIX_ENV))
-#include "../h/systm.h"
+#include "h/systm.h"
 #endif
 #else /* !UKERNEL */
-#include "../afs/sysincludes.h"
+#include "afs/sysincludes.h"
 #endif /* !UKERNEL */
 #ifdef RXDEBUG
 #undef RXDEBUG     /* turn off debugging */
 #endif /* RXDEBUG */
 
-#include "../rx/rx_kmutex.h"
-#include "../rx/rx_kernel.h"
-#include "../rx/rx_clock.h"
-#include "../rx/rx_queue.h"
-#include "../rx/rx.h"
-#include "../rx/rx_globals.h"
-#include "../afs/lock.h"
-#include "../afsint/afsint.h"
+#include "rx_kmutex.h"
+#include "rx/rx_kernel.h"
+#include "rx/rx_clock.h"
+#include "rx/rx_queue.h"
+#include "rx/rx.h"
+#include "rx/rx_globals.h"
+#include "afs/lock.h"
+#include "afsint.h"
 #ifdef  AFS_ALPHA_ENV
 #undef kmem_alloc
 #undef kmem_free
@@ -1046,37 +1046,6 @@ int rx_WritevAlloc(struct rx_call *call, struct iovec *iov, int *nio,
     return bytes;
 }
 
-int rx_WritevInit(struct rx_call *call)
-{
-    int bytes;
-    SPLVAR;
-
-    /*
-     * Free any packets from the last call to ReadvProc/WritevProc.
-     * We do not need the lock because the receiver threads only
-     * touch the iovq when the RX_CALL_IOVEC_WAIT flag is set, and the
-     * RX_CALL_IOVEC_WAIT is always cleared before returning from
-     * ReadvProc/WritevProc.
-     */
-    if (!queue_IsEmpty(&call->iovq)) {
-        register struct rx_packet *rp;
-        register struct rx_packet *nxp;
-        for (queue_Scan(&call->iovq, rp, nxp, rx_packet)) {
-            queue_Remove(rp);
-            rxi_FreePacket(rp);
-        }
-    }
-
-    NETPRI;
-    AFS_RXGLOCK();
-    MUTEX_ENTER(&call->lock);
-    bytes = rxi_WriteProc(call, &bytes, 0);
-    MUTEX_EXIT(&call->lock);
-    AFS_RXGUNLOCK();
-    USERPRI;
-    return bytes;
-}
-
 /* rxi_WritevProc -- internal version.
  *
  * Send buffers allocated in rxi_WritevAlloc.