summaryrefslogtreecommitdiffstats
path: root/vm
diff options
context:
space:
mode:
Diffstat (limited to 'vm')
-rw-r--r--vm/mmap.c2
-rw-r--r--vm/mmap.h4
-rw-r--r--vm/page.c2
-rw-r--r--vm/page.h2
4 files changed, 5 insertions, 5 deletions
diff --git a/vm/mmap.c b/vm/mmap.c
index 55ee91b..0dc9190 100644
--- a/vm/mmap.c
+++ b/vm/mmap.c
@@ -38,7 +38,7 @@ mmap_table_free (struct mmap_table *table)
38/* inserts a new mmap entry in the mmap table. 38/* inserts a new mmap entry in the mmap table.
39 returns -1 if entry is invalid or already in the table */ 39 returns -1 if entry is invalid or already in the table */
40mapid_t 40mapid_t
41mmap_table_insert (struct mmap_table *table, uint8_t *upage, struct file *file, 41mmap_table_insert (struct mmap_table *table, void *upage, struct file *file,
42 off_t len) 42 off_t len)
43{ 43{
44 off_t ofs = 0; 44 off_t ofs = 0;
diff --git a/vm/mmap.h b/vm/mmap.h
index 09276a7..159e61a 100644
--- a/vm/mmap.h
+++ b/vm/mmap.h
@@ -18,14 +18,14 @@ struct mmap_table
18/* a single entry in the mmap table */ 18/* a single entry in the mmap table */
19struct mmap_table_entry 19struct mmap_table_entry
20{ 20{
21 uint8_t *upage; /* virtual address of first page of mmapped file */ 21 void *upage; /* virtual address of first page of mmapped file */
22 struct file *file; /* file handle */ 22 struct file *file; /* file handle */
23 int pages; /* number of pages the mapping needs */ 23 int pages; /* number of pages the mapping needs */
24}; 24};
25 25
26bool mmap_table_init (struct mmap_table *table); 26bool mmap_table_init (struct mmap_table *table);
27void mmap_table_free (struct mmap_table *table); 27void mmap_table_free (struct mmap_table *table);
28mapid_t mmap_table_insert (struct mmap_table *table, uint8_t *upage, 28mapid_t mmap_table_insert (struct mmap_table *table, void *upage,
29 struct file *file, off_t len); 29 struct file *file, off_t len);
30bool mmap_table_remove (struct mmap_table *table, mapid_t mapping); 30bool mmap_table_remove (struct mmap_table *table, mapid_t mapping);
31 31
diff --git a/vm/page.c b/vm/page.c
index 98120e5..b40382f 100644
--- a/vm/page.c
+++ b/vm/page.c
@@ -69,7 +69,7 @@ page_table_insert (struct hash *ht, struct page_table_entry *pte)
69 returns false if entry is invalid or already in the table */ 69 returns false if entry is invalid or already in the table */
70bool 70bool
71page_table_insert_segment (struct hash *ht, struct file *file, off_t ofs, 71page_table_insert_segment (struct hash *ht, struct file *file, off_t ofs,
72 uint8_t *upage, uint32_t read_bytes, bool writable) 72 void *upage, uint32_t read_bytes, bool writable)
73{ 73{
74 struct page_table_entry *pte = malloc (sizeof *pte); 74 struct page_table_entry *pte = malloc (sizeof *pte);
75 if (pte == NULL) 75 if (pte == NULL)
diff --git a/vm/page.h b/vm/page.h
index c78ab65..b7997fe 100644
--- a/vm/page.h
+++ b/vm/page.h
@@ -28,7 +28,7 @@ void page_table_free (struct hash *ht);
28struct page_table_entry *page_table_fetch (struct hash *ht, void *upage); 28struct page_table_entry *page_table_fetch (struct hash *ht, void *upage);
29struct page_table_entry *page_table_remove (struct hash *ht, void *upage); 29struct page_table_entry *page_table_remove (struct hash *ht, void *upage);
30bool page_table_insert_segment (struct hash *ht, struct file *file, off_t ofs, 30bool page_table_insert_segment (struct hash *ht, struct file *file, off_t ofs,
31 uint8_t *upage, uint32_t read_bytes, bool writable); 31 void *upage, uint32_t read_bytes, bool writable);
32bool page_load (struct page_table_entry *pte); 32bool page_load (struct page_table_entry *pte);
33 33
34#endif 34#endif