Initialised shared_files global hash table, w/ G
This commit is contained in:
@@ -4,6 +4,8 @@
|
||||
#include "threads/thread.h"
|
||||
#include "filesys/off_t.h"
|
||||
|
||||
struct hash shared_files;
|
||||
|
||||
enum page_type {
|
||||
PAGE_EXECUTABLE,
|
||||
PAGE_EMPTY
|
||||
@@ -47,6 +49,12 @@ struct page_entry *page_insert (struct file *file, off_t ofs, void *upage,
|
||||
struct page_entry *page_get (void *upage);
|
||||
bool page_load (struct page_entry *page, bool writable);
|
||||
void page_cleanup (struct hash_elem *e, void *aux);
|
||||
|
||||
unsigned shared_file_hash (const struct hash_elem *e, void *aux);
|
||||
bool shared_file_less (const struct hash_elem *a_, const struct hash_elem *b_,
|
||||
void *aux);
|
||||
struct shared_page_entry *shared_page_get (struct file *file, void *upage);
|
||||
|
||||
void page_set_swap (struct thread *, void *, size_t);
|
||||
size_t page_get_swap (struct thread *, void *);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user