Refactor frame to add spacing and exception for indentation to follow pintos styling
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user