Skip to content

Commit

Permalink
Reset SP on exit.
Browse files Browse the repository at this point in the history
  • Loading branch information
pykello committed Aug 9, 2014
1 parent e8ae846 commit 825fdc6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kernel/ksyscall.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include <console.h>
#include <klib.h>
#include <ksyscall.h>
#include <lib/string.h>
#include <lib/syscall.h>
#include <monitor.h>
#include <proc.h>
Expand Down Expand Up @@ -34,10 +35,10 @@ static int syscall_exit(int arg1)
return -1;

set_translation_table_base((uint32_t) V2P(kernel_vm));

proc_free(current_process);
current_process = NULL;

__asm__ volatile("ldr sp, =kernel_stack_start");
enable_interrupts();
monitor();

Expand Down

0 comments on commit 825fdc6

Please sign in to comment.