diff options
author | Luke T. Shumaker <lukeshu@lukeshu.com> | 2025-05-12 14:26:21 -0600 |
---|---|---|
committer | Luke T. Shumaker <lukeshu@lukeshu.com> | 2025-05-12 14:26:21 -0600 |
commit | 811d9700e1414dae3357361b3ca565f673f63b08 (patch) | |
tree | ce628075a2ae59d5362d2662465c918f57e81607 /libhw_generic/include/libhw/generic/io.h | |
parent | cd5e55ebb7d5a51c0a8bd62137ab75a0f6ff1356 (diff) | |
parent | b4a081932338f65aa87aeba5008463feb0a78519 (diff) |
Diffstat (limited to 'libhw_generic/include/libhw/generic/io.h')
-rw-r--r-- | libhw_generic/include/libhw/generic/io.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libhw_generic/include/libhw/generic/io.h b/libhw_generic/include/libhw/generic/io.h index 6adce8c..96680bb 100644 --- a/libhw_generic/include/libhw/generic/io.h +++ b/libhw_generic/include/libhw/generic/io.h @@ -58,6 +58,8 @@ void io_slice_wr_to_duplex(struct duplex_iovec *dst, const struct iovec *src, in /** * Return bytes-read on success, 0 on EOF, -errno on error; a short * read is *not* an error. + * + * It is invalid to call readv when the sum length of iovecs is 0. */ #define io_reader_LO_IFACE \ LO_FUNC(ssize_t, readv, const struct iovec *iov, int iovcnt) @@ -71,6 +73,8 @@ LO_INTERFACE(io_reader); * * Writes are *not* guaranteed to be atomic, so if you have concurrent * writers then you should arrange for a mutex to protect the writer. + * + * It is invalid to call writev when the sum length of iovecs is 0. */ #define io_writer_LO_IFACE \ LO_FUNC(ssize_t, writev, const struct iovec *iov, int iovcnt) @@ -100,6 +104,8 @@ LO_INTERFACE(io_bidi_closer); /** * Return bytes-read and bytes-written on success, -errno on error; a * short read/write *is* an error. + * + * It is invalid to call readwritev when the sum length of iovecs is 0. */ #define io_duplex_readwriter_LO_IFACE \ LO_FUNC(void, readwritev, const struct duplex_iovec *iov, int iovcnt) |