MCPcopy Create free account
hub / github.com/ceph/ceph / writev

Function writev

src/common/compat.cc:379–392  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

377}
378
379ssize_t writev(int fd, const struct iovec *iov, int iov_cnt) {
380 ssize_t written = 0;
381
382 for (int i = 0; i < iov_cnt; i++) {
383 int r = ::write(fd, iov[i].iov_base, iov[i].iov_len);
384 if (r < 0)
385 return r;
386 written += r;
387 if ((unsigned)r < iov[i].iov_len)
388 break;
389 }
390
391 return written;
392}
393
394int &alloc_tls() {
395 static __thread int tlsvar;

Callers 5

do_writevFunction · 0.85
write_fdMethod · 0.85
sendMethod · 0.85
log_printFunction · 0.85
proxy_link_sendFunction · 0.85

Calls 1

writeFunction · 0.70

Tested by

no test coverage detected