summaryrefslogtreecommitdiff
path: root/src/kernel/mem/seg.h
diff options
context:
space:
mode:
authorAlex AUVOLAT <alexis211@gmail.com>2012-05-04 20:06:37 +0200
committerAlex AUVOLAT <alexis211@gmail.com>2012-05-04 20:06:37 +0200
commit277e4af4fa9e80816c809542d792ee6bebb7f202 (patch)
tree9abb7f207d185909427137e4861b81c057de1259 /src/kernel/mem/seg.h
parente9683297bf480f9590b0e5796f4520fb430e2e03 (diff)
downloadTCE-277e4af4fa9e80816c809542d792ee6bebb7f202.tar.gz
TCE-277e4af4fa9e80816c809542d792ee6bebb7f202.zip
Migration to C++!
Diffstat (limited to 'src/kernel/mem/seg.h')
-rw-r--r--src/kernel/mem/seg.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/kernel/mem/seg.h b/src/kernel/mem/seg.h
index d37ba59..ea95dfa 100644
--- a/src/kernel/mem/seg.h
+++ b/src/kernel/mem/seg.h
@@ -12,23 +12,23 @@ struct segment {
int mappings;
// these 4 functions must not be used directly by anyone
- struct segment_map* (*map)(struct segment* seg, struct page_directory* pagedir, size_t offset);
- void (*unmap)(struct segment_map*);
- void (*delete)(struct segment* seg);
- int (*handle_fault)(struct segment_map* map, size_t addr, int write); //0 if ok, 1 if segfault
+ segment_map* (*map)(segment* seg, page_directory* pagedir, size_t offset);
+ void (*unmap)(segment_map*);
+ void (*del)(segment* seg);
+ int (*handle_fault)(segment_map* map, size_t addr, int write); //0 if ok, 1 if segfault
};
struct segment_map {
- struct segment* seg;
- struct page_directory* pagedir;
+ segment* seg;
+ page_directory* pagedir;
size_t start, len;
- struct segment_map *next;
+ segment_map *next;
};
//parameter offset in seg_map doesn't need to be used
-struct segment_map *seg_map(struct segment* seg, struct page_directory* pagedir, size_t offset);
-/* When unmapping a segment, the segment is deleted if it is not mapped anywhere anymore. */
-void seg_unmap(struct segment_map* map);
+segment_map *seg_map(segment* seg, page_directory* pagedir, size_t offset);
+// When unmapping a segment, the segment is deleted if it is not mapped anywhere anymore.
+void seg_unmap(segment_map* map);
/// ************************************* SIMPLESEG stuff *****************
@@ -37,7 +37,7 @@ struct simpleseg {
size_t start, len;
};
-struct segment* simpleseg_make(size_t start, size_t len, int writable);
-int simpleseg_resize(struct segment_map *map, size_t len);
+segment* simpleseg_make(size_t start, size_t len, int writable);
+int simpleseg_resize(segment_map *map, size_t len);
#endif