Add SPT Helper Functions: Insert, Get, Cleanup w/ G

This commit is contained in:
sBubshait
2024-11-28 18:18:41 +00:00
parent 14fc96febf
commit 97e6e0fb1e
3 changed files with 57 additions and 3 deletions

View File

@@ -24,8 +24,12 @@ struct page_entry {
};
unsigned page_hash (const struct hash_elem *e, void *aux);
bool page_less (const struct hash_elem *a_, const struct hash_elem *b_, void *aux);
bool page_less (const struct hash_elem *a_, const struct hash_elem *b_,
void *aux);
struct page_entry *page_insert (struct file *file, off_t ofs, void *upage,
uint32_t read_bytes, uint32_t zero_bytes,
bool writable, enum page_type type);
void page_cleanup (struct hash_elem *e, void *aux);
void page_set_swap (struct thread *, void *, size_t);
size_t page_get_swap (struct thread *, void *);