hermit::syscalls

Function sys_writev

Source
#[no_mangle]
pub unsafe extern "C" fn sys_writev(
    fd: i32,
    iov: *const iovec,
    iovcnt: usize,
) -> isize
Expand description

write() attempts to write nbyte of data to the object referenced by the descriptor fd from a buffer. writev() performs the same action, but gathers the output data from the iovcnt buffers specified by the members of the iov array: iov[0], iov[1], ..., iov[iovcnt-1].

struct iovec {
    char   *iov_base;  /* Base address. */
    size_t iov_len;    /* Length. */
};

Each iovec entry specifies the base address and length of an area in memory from which data should be written. writev() will always write a complete area before proceeding to the next.