summaryrefslogtreecommitdiff
path: root/libhw_generic/include/libhw/generic/io.h
diff options
context:
space:
mode:
authorLuke T. Shumaker <lukeshu@lukeshu.com>2025-05-12 14:26:21 -0600
committerLuke T. Shumaker <lukeshu@lukeshu.com>2025-05-12 14:26:21 -0600
commit811d9700e1414dae3357361b3ca565f673f63b08 (patch)
treece628075a2ae59d5362d2662465c918f57e81607 /libhw_generic/include/libhw/generic/io.h
parentcd5e55ebb7d5a51c0a8bd62137ab75a0f6ff1356 (diff)
parentb4a081932338f65aa87aeba5008463feb0a78519 (diff)
Merge branch 'lukeshu/misc'HEADmain
Diffstat (limited to 'libhw_generic/include/libhw/generic/io.h')
-rw-r--r--libhw_generic/include/libhw/generic/io.h6
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)