address-space is a non-recursive data structure, which contains a flat list of vm_areas representing mapped vm-objects. userspace programs can no longer create sub-address-spaces. instead, they can reserve portions of the address space, and use that reserved space to create mappings.
34 lines
773 B
C
34 lines
773 B
C
#ifndef KERNEL_IOVEC_H_
|
|
#define KERNEL_IOVEC_H_
|
|
|
|
#include <mango/types.h>
|
|
#include <stddef.h>
|
|
|
|
struct address_space;
|
|
|
|
struct iovec_iterator {
|
|
/* if this is set, we are iterating over a list of iovecs stored in
|
|
* userspace, and must go through this region to retrieve the data. */
|
|
struct address_space *it_region;
|
|
const kern_iovec_t *it_vecs;
|
|
size_t it_nr_vecs;
|
|
size_t it_vec_ptr;
|
|
|
|
virt_addr_t it_base;
|
|
size_t it_len;
|
|
};
|
|
|
|
extern void iovec_iterator_begin(
|
|
struct iovec_iterator *it,
|
|
const kern_iovec_t *vecs,
|
|
size_t nr_vecs);
|
|
extern void iovec_iterator_begin_user(
|
|
struct iovec_iterator *it,
|
|
struct address_space *address_space,
|
|
const kern_iovec_t *vecs,
|
|
size_t nr_vecs);
|
|
|
|
extern void iovec_iterator_seek(struct iovec_iterator *it, size_t nr_bytes);
|
|
|
|
#endif
|