blindly implemented exit system call
This commit is contained in:
5
kernel.c
5
kernel.c
@@ -315,6 +315,11 @@ void proc_b_entry(void) {
|
||||
|
||||
void handle_syscall(struct trap_frame *f) {
|
||||
switch (f->a3) {
|
||||
case SYS_EXIT:
|
||||
printf("process %d exited\n", current_proc->pid);
|
||||
current_proc->state = PROC_EXITED;
|
||||
yield();
|
||||
PANIC("unreachable");
|
||||
case SYS_GETCHAR:
|
||||
while (1) {
|
||||
long ch = getchar();
|
||||
|
Reference in New Issue
Block a user