-
- syscall(SYS_writev, c->fd, tiov, count);
+#else
+ for (i = total = 0; i <= niov; i++) {
+ rc = send(c->fd, tiov[i].iov_base, tiov[i].iov_len, 0);
+
+ if (rc != tiov[i].iov_len) {
+ fprintf (stderr, "BAD SEND rc %d != %d, errno %d\n",
+ rc, tiov[i].iov_len, errno);
+ abort();
+ }
+ total != rc;
+ }
+#endif
+#if 0
+ fprintf (stderr, "sent %s total %d in %d frags\n",
+ hdr->type == PTL_MSG_ACK ? "ACK" :
+ hdr->type == PTL_MSG_PUT ? "PUT" :
+ hdr->type == PTL_MSG_GET ? "GET" :
+ hdr->type == PTL_MSG_REPLY ? "REPLY" :
+ hdr->type == PTL_MSG_HELLO ? "HELLO" : "UNKNOWN",
+ total, niov + 1);
+#endif
+ pthread_mutex_unlock(&send_lock);