provided code
This commit is contained in:
20
src/userprog/syscall.c
Normal file
20
src/userprog/syscall.c
Normal file
@@ -0,0 +1,20 @@
|
||||
#include "userprog/syscall.h"
|
||||
#include <stdio.h>
|
||||
#include <syscall-nr.h>
|
||||
#include "threads/interrupt.h"
|
||||
#include "threads/thread.h"
|
||||
|
||||
static void syscall_handler (struct intr_frame *);
|
||||
|
||||
void
|
||||
syscall_init (void)
|
||||
{
|
||||
intr_register_int (0x30, 3, INTR_ON, syscall_handler, "syscall");
|
||||
}
|
||||
|
||||
static void
|
||||
syscall_handler (struct intr_frame *f UNUSED)
|
||||
{
|
||||
printf ("system call!\n");
|
||||
thread_exit ();
|
||||
}
|
||||
Reference in New Issue
Block a user