blindly implemented exit system call

This commit is contained in:
2025-07-31 13:14:28 +03:00
parent b65dc62257
commit 7bc28c2331
5 changed files with 11 additions and 1 deletions

View File

@@ -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();