mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-30 22:18:21 +00:00
mm: properly implement page locking
This commit is contained in:
@@ -66,10 +66,12 @@ size_t iovec_iterator_read_from_ringbuffer(iovec_iterator_t *iovec_iterator, rin
|
||||
// NOTE: the iovec can have userspace addresses. in this case, the copy can possibly fail with RINGBUFFER_USER_COPY_FAILED
|
||||
size_t iovec_iterator_peek_from_ringbuffer(iovec_iterator_t *iovec_iterator, ringbuffer_t *ringbuffer, size_t byte_count, uintmax_t ringbuffer_offset);
|
||||
|
||||
// returns the physical address of the next page in the iovec_iterator, adding a reference count while at it
|
||||
// returns the physical address of the next page in the iovec_iterator, adding a reference count and locking it for DMA.
|
||||
// The write bool controls whether the hint passed to mm_get_physical_address is a read or write (i.e. reading data from the page or
|
||||
// writing data to the page)
|
||||
// sets the page_offset to the offset in the page, page_remaining to the remaining number of bytes in the page and page to the physical address of the page
|
||||
// if no more pages in iovec_iterator, returns success with page being set to NULL
|
||||
// fails with EFAULT if the page is not mapped
|
||||
int iovec_iterator_next_page(iovec_iterator_t *iovec_iterator, size_t *page_offset, size_t *page_remaining, void **page);
|
||||
int iovec_iterator_next_page(iovec_iterator_t *iovec_iterator, size_t *page_offset, size_t *page_remaining, void **page, bool write);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user