refactor: dynamic stack growth functions to follow code style

This commit is contained in:
Themis Demetriades
2024-12-02 19:50:40 +00:00
parent 05a48cf9c6
commit 6adf2e743b
3 changed files with 33 additions and 23 deletions

View File

@@ -148,12 +148,12 @@ page_fault (struct intr_frame *f)
if (user && not_present)
{
if (try_alloc_new_page (fault_addr, f->esp))
if (handle_stack_fault (fault_addr, f->esp))
return;
}
else
{
if (try_alloc_new_page (fault_addr, thread_current ()->curr_esp))
if (handle_stack_fault (fault_addr, thread_current ()->curr_esp))
return;
f->eip = (void *)f->eax;