Skip to content
Snippets Groups Projects
Verified Commit 811cfc5f authored by a2-stratford's avatar a2-stratford Committed by ja3-saxby
Browse files

Dealing with issues brought up in merge request !12

syscall_exit.c
line 15..16: Condensed into one line
line 23: Removed for being unnescessary
system_calls.h
line 15: Made prototype consistent with declaration
parent 9ef3d686
2 merge requests!22Merge Feature/system calls,!12Alex/exit system call
......@@ -12,13 +12,9 @@
#include "threads/thread.h" // Dependency for thread struct
void syscall_exit(struct intr_frame *f) {
struct thread *current_thread; // creates thread struct from thread.h
current_thread = thread_current(); // Sets current thread
struct thread *current_thread = thread_current(); // Sets current thread
// pop off first int argument from interrupt frame
int exit_code = *((int*)f->esp + 1);
current_thread->exit_code = exit_code; // Returns exit code to kernel
thread_exit(); // Exiting current thread
f->eax = -1; // Returning -1 for success
}
\ No newline at end of file
......@@ -12,7 +12,7 @@ void syscall_halt(struct intr_frame *f);
* returned. Conventionally, a status of 0 indicates success and nonzero
* values indicate errors.
*/
void syscall_exit(struct intr_frame *status);
void syscall_exit(struct intr_frame *f);
/*
* Runs the executable whose name is given in cmd_line, passing any given
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment