MCPcopy Create free account
hub / github.com/bytecodealliance/rustix / pwritev64v2

Function pwritev64v2

src/backend/libc/c.rs:364–400  ·  view source on GitHub ↗
(
        fd: c_int,
        iov: *const iovec,
        iovcnt: c_int,
        offset: off64_t,
        flags: c_int,
    )

Source from the content-addressed store, hash-verified

362 }
363 }
364 pub(in super::super) unsafe fn pwritev64v2(
365 fd: c_int,
366 iov: *const iovec,
367 iovcnt: c_int,
368 offset: off64_t,
369 flags: c_int,
370 ) -> ssize_t {
371 // See the comments in `preadv64v2`.
372 weak! {
373 fn pwritev64v2(c_int, *const iovec, c_int, off64_t, c_int) -> ssize_t
374 }
375 if let Some(fun) = pwritev64v2.get() {
376 fun(fd, iov, iovcnt, offset, flags)
377 } else {
378 // Unlike the plain "p" functions, the "pv" functions pass their
379 // offset in an endian-independent way, and always in two
380 // registers.
381 syscall! {
382 fn pwritev2(
383 fd: c_int,
384 iov: *const iovec,
385 iovec: c_int,
386 offset_lo: usize,
387 offset_hi: usize,
388 flags: c_int
389 ) via SYS_pwritev2 -> ssize_t
390 }
391 pwritev2(
392 fd,
393 iov,
394 iovcnt,
395 offset as usize,
396 (offset >> 32) as usize,
397 flags,
398 )
399 }
400 }
401}
402#[cfg(all(target_os = "linux", target_env = "gnu"))]
403pub(super) use readwrite_pv64v2::{preadv64v2 as preadv2, pwritev64v2 as pwritev2};

Callers

nothing calls this directly

Calls 2

pwritev2Function · 0.50
getMethod · 0.45

Tested by

no test coverage detected