diff options
Diffstat (limited to 'vm')
| -rw-r--r-- | vm/mmap.c | 2 | ||||
| -rw-r--r-- | vm/mmap.h | 4 | ||||
| -rw-r--r-- | vm/page.c | 2 | ||||
| -rw-r--r-- | vm/page.h | 2 |
4 files changed, 5 insertions, 5 deletions
| @@ -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 */ |
| 40 | mapid_t | 40 | mapid_t |
| 41 | mmap_table_insert (struct mmap_table *table, uint8_t *upage, struct file *file, | 41 | mmap_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; |
| @@ -18,14 +18,14 @@ struct mmap_table | |||
| 18 | /* a single entry in the mmap table */ | 18 | /* a single entry in the mmap table */ |
| 19 | struct mmap_table_entry | 19 | struct 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 | ||
| 26 | bool mmap_table_init (struct mmap_table *table); | 26 | bool mmap_table_init (struct mmap_table *table); |
| 27 | void mmap_table_free (struct mmap_table *table); | 27 | void mmap_table_free (struct mmap_table *table); |
| 28 | mapid_t mmap_table_insert (struct mmap_table *table, uint8_t *upage, | 28 | mapid_t mmap_table_insert (struct mmap_table *table, void *upage, |
| 29 | struct file *file, off_t len); | 29 | struct file *file, off_t len); |
| 30 | bool mmap_table_remove (struct mmap_table *table, mapid_t mapping); | 30 | bool mmap_table_remove (struct mmap_table *table, mapid_t mapping); |
| 31 | 31 | ||
| @@ -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 */ |
| 70 | bool | 70 | bool |
| 71 | page_table_insert_segment (struct hash *ht, struct file *file, off_t ofs, | 71 | page_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) |
| @@ -28,7 +28,7 @@ void page_table_free (struct hash *ht); | |||
| 28 | struct page_table_entry *page_table_fetch (struct hash *ht, void *upage); | 28 | struct page_table_entry *page_table_fetch (struct hash *ht, void *upage); |
| 29 | struct page_table_entry *page_table_remove (struct hash *ht, void *upage); | 29 | struct page_table_entry *page_table_remove (struct hash *ht, void *upage); |
| 30 | bool page_table_insert_segment (struct hash *ht, struct file *file, off_t ofs, | 30 | bool 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); |
| 32 | bool page_load (struct page_table_entry *pte); | 32 | bool page_load (struct page_table_entry *pte); |
| 33 | 33 | ||
| 34 | #endif | 34 | #endif |
