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_map(void** addr_out,
22 struct mm_region** created,
25 struct mmap_param* param);
28 mem_unmap(ptr_t mnt, vm_regions_t* regions, void* addr, size_t length);
31 mem_unmap_region(ptr_t mnt, struct mm_region* region);
34 mem_sync_pages(ptr_t mnt,
35 struct mm_region* region,
42 vm_regions_t* regions,
47 #endif /* __LUNAIX_MMAP_H */