1 #ifndef __LUNAIX_MMAP_H
2 #define __LUNAIX_MMAP_H
5 #include <lunaix/mm/region.h>
6 #include <lunaix/types.h>
10 ptr_t vms_mnt; // vm mount point
11 struct proc_mm* pvms; // process vm
12 off_t offset; // mapped file offset
13 size_t mlen; // mapped memory length
14 size_t flen; // mapped file length
15 u32_t proct; // protections
16 u32_t flags; // other options
17 u32_t type; // region type
21 mem_adjust_inplace(vm_regions_t* regions,
22 struct mm_region* region,
26 mem_map(void** addr_out,
27 struct mm_region** created,
30 struct mmap_param* param);
33 mem_unmap(ptr_t mnt, vm_regions_t* regions, void* addr, size_t length);
36 mem_unmap_region(ptr_t mnt, struct mm_region* region);
39 mem_sync_pages(ptr_t mnt,
40 struct mm_region* region,
47 vm_regions_t* regions,
52 #endif /* __LUNAIX_MMAP_H */