X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/0eabc11fcf240415e39f3873dfce7cd9384b3042..22d06cbaaf660067bfea03f73bee9c8630c05d50:/lunaix-os/includes/lunaix/mm/mmap.h diff --git a/lunaix-os/includes/lunaix/mm/mmap.h b/lunaix-os/includes/lunaix/mm/mmap.h index f85302e..307610b 100644 --- a/lunaix-os/includes/lunaix/mm/mmap.h +++ b/lunaix-os/includes/lunaix/mm/mmap.h @@ -15,6 +15,8 @@ struct mmap_param u32_t proct; // protections u32_t flags; // other options u32_t type; // region type + ptr_t range_start; + ptr_t range_end; }; int @@ -22,15 +24,22 @@ mem_adjust_inplace(vm_regions_t* regions, struct mm_region* region, ptr_t newend); +int +mmap_user(void** addr_out, + struct mm_region** created, + ptr_t addr, + struct v_file* file, + struct mmap_param* param); + int mem_map(void** addr_out, struct mm_region** created, - void* addr, + ptr_t addr, struct v_file* file, struct mmap_param* param); int -mem_unmap(ptr_t mnt, vm_regions_t* regions, void* addr, size_t length); +mem_unmap(ptr_t mnt, vm_regions_t* regions, ptr_t addr, size_t length); void mem_unmap_region(ptr_t mnt, struct mm_region* region);