Merge branch 'vm/memory-mapped-files' into vm/virtual-memory/saleh
This commit is contained in:
@@ -15,10 +15,13 @@
|
||||
#include "threads/switch.h"
|
||||
#include "threads/synch.h"
|
||||
#include "threads/vaddr.h"
|
||||
#include "vm/page.h"
|
||||
#ifdef USERPROG
|
||||
#include "userprog/process.h"
|
||||
#include "userprog/syscall.h"
|
||||
#include "vm/page.h"
|
||||
#endif
|
||||
#ifdef VM
|
||||
#include "vm/mmap.h"
|
||||
#endif
|
||||
|
||||
/* Random value for struct thread's `magic' member.
|
||||
@@ -274,6 +277,10 @@ thread_create (const char *name, int priority,
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef VM
|
||||
mmap_init (t);
|
||||
#endif
|
||||
|
||||
/* Prepare thread for first run by initializing its stack.
|
||||
Do this atomically so intermediate values for the 'stack'
|
||||
member cannot be observed. */
|
||||
|
||||
@@ -137,6 +137,10 @@ struct thread
|
||||
|
||||
struct hash pages; /* Table of open user pages. */
|
||||
|
||||
/* Memory mapped files for user virtual memory. */
|
||||
struct hash mmap_files; /* List of memory mapped files. */
|
||||
unsigned int mmap_counter; /* Counter for memory mapped files. */
|
||||
|
||||
#ifdef USERPROG
|
||||
/* Owned by userprog/process.c. */
|
||||
uint32_t *pagedir; /* Page directory. */
|
||||
|
||||
Reference in New Issue
Block a user