Add helper functions to initialise the memory-mapped files table and counter

This commit is contained in:
sBubshait
2024-12-04 15:08:43 +00:00
parent b3042b5aa6
commit 1ce09a49a1
3 changed files with 41 additions and 1 deletions

View File

@@ -16,6 +16,7 @@
#include "threads/synch.h"
#include "threads/vaddr.h"
#include "vm/page.h"
#include "vm/mmap.h"
#ifdef USERPROG
#include "userprog/process.h"
#include "userprog/syscall.h"
@@ -274,6 +275,8 @@ thread_create (const char *name, int priority,
}
#endif
mmap_init ();
/* Prepare thread for first run by initializing its stack.
Do this atomically so intermediate values for the 'stack'
member cannot be observed. */