Fix issues with merging, duplicate references and definition of VM
This commit is contained in:
@@ -149,10 +149,6 @@ struct thread
|
|||||||
struct hash open_files; /* Hash Table of FD -> Struct File. */
|
struct hash open_files; /* Hash Table of FD -> Struct File. */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef VM
|
|
||||||
struct hash pages; /* Table of open user pages. */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void *curr_esp;
|
void *curr_esp;
|
||||||
|
|
||||||
/* Owned by thread.c. */
|
/* Owned by thread.c. */
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# -*- makefile -*-
|
# -*- makefile -*-
|
||||||
|
|
||||||
kernel.bin: DEFINES = -DUSERPROG -DFILESYS
|
kernel.bin: DEFINES = -DUSERPROG -DFILESYS -DVM
|
||||||
KERNEL_SUBDIRS = threads devices lib lib/kernel userprog filesys
|
KERNEL_SUBDIRS = threads devices lib lib/kernel userprog filesys vm
|
||||||
TEST_SUBDIRS = tests/userprog tests/userprog/no-vm tests/filesys/base
|
TEST_SUBDIRS = tests/userprog tests/userprog/no-vm tests/filesys/base
|
||||||
GRADING_FILE = $(SRCDIR)/tests/userprog/Grading
|
GRADING_FILE = $(SRCDIR)/tests/userprog/Grading
|
||||||
SIMULATOR = --qemu
|
SIMULATOR = --qemu
|
||||||
|
|||||||
@@ -126,21 +126,3 @@ mmap_cleanup (struct hash_elem *e, void *aux UNUSED)
|
|||||||
struct mmap_entry *mmap = hash_entry (e, struct mmap_entry, elem);
|
struct mmap_entry *mmap = hash_entry (e, struct mmap_entry, elem);
|
||||||
mmap_unmap (mmap);
|
mmap_unmap (mmap);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Updates the 'owner' thread's page table entry for virtual address 'upage'
|
|
||||||
to have a present bit of 0 and stores the specified swap slot value in the
|
|
||||||
entry for later retrieval from disk. */
|
|
||||||
void
|
|
||||||
page_set_swap (struct thread *owner, void *upage, size_t swap_slot)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Given that the page with user address 'upage' owned by 'owner' is flagged
|
|
||||||
to be in the swap disk via the owner's page table, returns its stored
|
|
||||||
swap slot. Otherwise panics the kernel. */
|
|
||||||
size_t
|
|
||||||
page_get_swap (struct thread *owner, void *upage)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user