X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/74926d2db1d9f3228acdfca03013a8ba0ac1d8c0..b60166b327a9108b07e3069fa6568a451529ffd9:/lunaix-os/includes/lunaix/mm/mm.h?ds=sidebyside diff --git a/lunaix-os/includes/lunaix/mm/mm.h b/lunaix-os/includes/lunaix/mm/mm.h index 43ef96e..31954d3 100644 --- a/lunaix-os/includes/lunaix/mm/mm.h +++ b/lunaix-os/includes/lunaix/mm/mm.h @@ -1,20 +1,9 @@ #ifndef __LUNAIX_MM_H #define __LUNAIX_MM_H -#include -#include -#include #include -#include - -typedef struct -{ - void* start; - void* brk; - void* max_addr; - mutex_t lock; -} heap_context_t; +#include /** * @brief 私有区域,该区域中的页无法进行任何形式的共享。 @@ -45,6 +34,7 @@ typedef struct #define REGION_EXEC PROT_EXEC #define REGION_ANON MAP_ANON #define REGION_RW REGION_READ | REGION_WRITE +#define REGION_KERNEL (1 << 31) #define REGION_TYPE_CODE (1 << 16) #define REGION_TYPE_GENERAL (2 << 16) @@ -52,18 +42,4 @@ typedef struct #define REGION_TYPE_STACK (4 << 16) #define REGION_TYPE_VARS (5 << 16) -struct mm_region -{ - struct llist_header head; // must be first field! - struct v_file* mfile; - u32_t offset; - ptr_t start; - ptr_t end; - u32_t attr; - - void* data; - int (*init_page)(struct mm_region*, void*, off_t); - void (*destruct_region)(struct mm_region*); -}; - #endif /* __LUNAIX_MM_H */