move iovec_iter_kernel out of header

This commit is contained in:
2026-10-17 11:25:53 +02:00
parent c62a908735
commit 27b2905dd7
2 changed files with 17 additions and 15 deletions
+1 -15
View File
@@ -24,21 +24,7 @@ static inline size_t iovec_iter_len(iovec_iter_t* iter) {
}
// Creates an iovec iterator over kernel memory.
static inline iovec_iter_t iovec_iter_kernel(iovec_t* iovecs, size_t count) {
size_t total = 0;
for (size_t i = 0; i < count; i++)
total += iovecs[i].len;
return (iovec_iter_t){
.iovecs = iovecs,
.iovecs_len = count,
.total_len = total,
.total_offset = 0,
.current_idx = 0,
.current_offset = 0,
.user = false,
};
}
iovec_iter_t iovec_iter_kernel(iovec_t* iovecs, size_t count);
// Copies up to `len` bytes from `src` into the iterator and advances it.
// Returns the amount of bytes actually copied in `out_copied`.