7f758c617d8089fd664cafba0d7973ae9ccc5e57
[pintos-anon] / src / userprog / syscall.c
1 #include "userprog/syscall.h"
2 #include <stdio.h>
3 #include <syscall-nr.h>
4 #include "threads/interrupt.h"
5 #include "threads/thread.h"
6
7 static void syscall_handler (struct intr_frame *);
8
9 void
10 syscall_init (void) 
11 {
12   intr_register (0x30, 3, INTR_ON, syscall_handler, "syscall");
13 }
14
15 static void
16 syscall_handler (struct intr_frame *f) 
17 {
18   printf ("system call!\n");
19   thread_exit ();
20 }