feat: wrapper function for bootstraping user program
[lunaix-os.git] / lunaix-os / includes / lunaix / mm / region.h
index 8da41d2c1019d84e6a9c907af4c37a3dfd6f436f..99e9990a3e306c51e727ffd019c5c238e700954d 100644 (file)
@@ -2,13 +2,26 @@
 #define __LUNAIX_REGION_H
 
 #include <lunaix/mm/mm.h>
-#include <lunaix/process.h>
 
-void region_add(struct proc_info* proc, unsigned long start, unsigned long end, unsigned int attr);
+struct mm_region*
+region_create(ptr_t start, ptr_t end, u32_t attr);
 
-void region_release_all(struct proc_info* proc);
+struct mm_region*
+region_create_range(ptr_t start, size_t length, u32_t attr);
 
-struct mm_region* region_get(struct proc_info* proc, unsigned long vaddr);
+void
+region_add(vm_regions_t* lead, struct mm_region* vmregion);
 
+void
+region_release(struct mm_region* region);
+
+void
+region_release_all(vm_regions_t* lead);
+
+struct mm_region*
+region_get(vm_regions_t* lead, unsigned long vaddr);
+
+void
+region_copy(struct proc_mm* src, struct proc_mm* dest);
 
 #endif /* __LUNAIX_REGION_H */