lab 2 (probably working)

This commit is contained in:
2020-05-25 18:00:42 +02:00
parent df7631de81
commit 404ae75cfa
6 changed files with 201 additions and 14 deletions

View File

@@ -110,6 +110,25 @@ syscall(struct trapframe *tf)
break;
/* Add stuff here */
case SYS_read:
err = sys_read(
(int)tf->tf_a0,
(userptr_t)tf->tf_a1,
(size_t)tf->tf_a2
);
break;
case SYS_write:
err = sys_write(
(int)tf->tf_a0,
(userptr_t)tf->tf_a1,
(size_t)tf->tf_a2
);
break;
case SYS__exit:
sys__exit((int)tf->tf_a0);
break;
default:
kprintf("Unknown syscall %d\n", callno);