Refactor frame to add spacing and exception for indentation to follow pintos styling #68

Merged
sb3923 merged 1 commits from vm/syscall-mmap/styling into master 2024-12-06 18:28:40 +00:00
2 changed files with 8 additions and 5 deletions
Showing only changes of commit 5fbabdcec9 - Show all commits

View File

@@ -181,11 +181,11 @@ page_fault (struct intr_frame *f)
/* If the page fault occurred in kernel mode, then we intentionally indicate
a fault (for get_user() etc). */
if (!user)
{
f->eip = (void *)f->eax;
f->eax = 0xffffffff;
return;
}
{
f->eip = (void *)f->eax;
f->eax = 0xffffffff;
return;
}
/* To implement virtual memory, delete the rest of the function

View File

@@ -241,6 +241,7 @@ frame_owner_insert (void *frame, struct thread *owner)
struct frame_owner *frame_owner = malloc (sizeof (struct frame_owner));
if (frame_owner == NULL)
return false;
frame_owner->owner = owner;
list_push_back (&frame_metadata->owners, &frame_owner->elem);
return true;
@@ -263,6 +264,7 @@ frame_owner_remove (void *frame, struct thread *owner)
{
struct frame_owner *frame_owner
= list_entry (oe, struct frame_owner, elem);
oe = list_next (oe);
if (frame_owner->owner == owner)
{
@@ -284,6 +286,7 @@ frame_metadata_find (void *frame)
struct hash_elem *e = hash_find (&frame_table, &key_metadata.hash_elem);
if (e == NULL)
return NULL;
return hash_entry (e, struct frame_metadata, hash_elem);
}