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 u32_t proct; // protections
15 u32_t flags; // other options
16 u32_t type; // region type
22 mem_adjust_inplace(vm_regions_t* regions,
23 struct mm_region* region,
27 mmap_user(void** addr_out,
28 struct mm_region** created,
31 struct mmap_param* param);
34 mem_map(void** addr_out,
35 struct mm_region** created,
38 struct mmap_param* param);
41 mem_unmap(ptr_t mnt, vm_regions_t* regions, ptr_t addr, size_t length);
44 mem_unmap_region(ptr_t mnt, struct mm_region* region);
47 mem_sync_pages(ptr_t mnt,
48 struct mm_region* region,
55 vm_regions_t* regions,
60 #endif /* __LUNAIX_MMAP_H */