feat: (vm) memory mapping support: mmap/munmap
[lunaix-os.git] / lunaix-os / includes / lunaix / mm / mm.h
index 060b88181aa733d7d2592155a5fffe3509119e1a..07d3d791df3f12fa05c6bbc52a6a7c11d5bc1243 100644 (file)
@@ -3,6 +3,8 @@
 
 #include <lunaix/ds/llist.h>
 #include <lunaix/ds/mutex.h>
+#include <lunaix/fs.h>
+#include <lunaix/types.h>
 
 typedef struct
 {
@@ -33,6 +35,7 @@ typedef struct
 #define REGION_WSHARED 0x2
 
 #define REGION_PERM_MASK 0x1c
+#define REGION_MODE_MASK 0x3
 
 #define REGION_READ (1 << 2)
 #define REGION_WRITE (1 << 3)
@@ -47,9 +50,11 @@ typedef struct
 struct mm_region
 {
     struct llist_header head;
-    unsigned long start;
-    unsigned long end;
-    unsigned int attr;
+    struct v_file* mfile;
+    u32_t offset;
+    ptr_t start;
+    ptr_t end;
+    u32_t attr;
 };
 
 #endif /* __LUNAIX_MM_H */