X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fuserprog%2Fsyscall.c;h=370c89b10f90501a4684c604ddbff9503481cf7a;hb=615bf3b3d2a8573ed6fb9ddc0055745e163ac999;hp=6084726f607506aa97a137c98303dc9732364a8d;hpb=8d321fddc6a25651e7fccacfe46b0ff1c4e52501;p=pintos-anon diff --git a/src/userprog/syscall.c b/src/userprog/syscall.c index 6084726..370c89b 100644 --- a/src/userprog/syscall.c +++ b/src/userprog/syscall.c @@ -1,19 +1,20 @@ -#include "syscall.h" -#include "lib.h" -#include "interrupt.h" -#include "thread.h" +#include "userprog/syscall.h" +#include +#include +#include "threads/interrupt.h" +#include "threads/thread.h" static void syscall_handler (struct intr_frame *); void syscall_init (void) { - intr_register (0x30, 3, INTR_ON, syscall_handler, "syscall"); + intr_register_int (0x30, 3, INTR_ON, syscall_handler, "syscall"); } static void -syscall_handler (struct intr_frame *f) +syscall_handler (struct intr_frame *f UNUSED) { - printk ("system call!\n"); + printf ("system call!\n"); thread_exit (); }