iovec: iovec_iterator_memset and fix iovec_iterator_copy_*_buffer

This commit is contained in:
Matheus
2024-09-21 12:07:13 -03:00
parent 09836801a3
commit 15f2cd0cc5
2 changed files with 36 additions and 2 deletions
+4
View File
@@ -44,6 +44,10 @@ int iovec_iterator_copy_to_buffer(iovec_iterator_t *iovec_iterator, void *buffer
// NOTE: the iovec can have userspace addresses. in this case, the copy can possibly fail with EFAULT
int iovec_iterator_copy_from_buffer(iovec_iterator_t *iovec_iterator, void *buffer, size_t byte_count);
// sets byte_count bytes in the iovec_iterator to byte
// NOTE: the iovec can have userspace addresses. in this case, the memset can possibly fail with EFAULT
int iovec_iterator_memset(iovec_iterator_t *iovec_iterator, uint8_t byte, size_t byte_count);
// copies byte_count bytes from the iovec_iterator into the ringbuffer
// returns the number of bytes copied
// NOTE: the iovec can have userspace addresses. in this case, the copy can possibly fail by returning RINGBUFFER_USER_COPY_FAILED