X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fuserprog%2Fsyscall.c;h=370c89b10f90501a4684c604ddbff9503481cf7a;hb=0e44b3e0539acc8c47a08c9bfa4a98a42cdc7114;hp=e6dfe94fb354b6162e92eb4c3b79719103426d43;hpb=f6580e9ad405b519dbe85027691bf3c66074b0a4;p=pintos-anon diff --git a/src/userprog/syscall.c b/src/userprog/syscall.c index e6dfe94..370c89b 100644 --- a/src/userprog/syscall.c +++ b/src/userprog/syscall.c @@ -1,5 +1,6 @@ -#include "syscall.h" -#include "lib/lib.h" +#include "userprog/syscall.h" +#include +#include #include "threads/interrupt.h" #include "threads/thread.h" @@ -8,12 +9,12 @@ 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 (); }