diff options
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) |