Skip to content

Commit

Permalink
[#18] Implement halt system call
Browse files Browse the repository at this point in the history
Implementation of halt system call, using function defined in init.h
  • Loading branch information
Lment committed Apr 9, 2017
1 parent 3f74056 commit d8635a5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/userprog/syscall.c
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
#include "userprog/syscall.h"
#include <stdio.h>
#include <syscall-nr.h>
#include <debug.h>
#include "threads/interrupt.h"
#include "threads/thread.h"
#include "threads/synch.h"
#include "threads/init.h"

#define pid_t int

Expand Down Expand Up @@ -88,10 +90,12 @@ syscall_handler (struct intr_frame *f UNUSED)
}
}

/* Terminate pintos by calling built-in command. */
static void
syscall_halt (void)
{

power_off ();
NOT_REACHED ();
}

static void
Expand Down

0 comments on commit d8635a5

Please sign in to comment.