From 8c5fef6e00b0afe7a4f72fe9f8c72ade1ce4c673 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Thu, 6 Aug 2020 20:41:07 +0200 Subject: Some context switch fixes. I'm quite tired actually and I don't seem to find my mistakes... --- src/features/syscall.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/features/syscall.c') diff --git a/src/features/syscall.c b/src/features/syscall.c index 2279429..3d012cf 100644 --- a/src/features/syscall.c +++ b/src/features/syscall.c @@ -5,15 +5,17 @@ #include #include #include +#include +int i = 0; void syscall_handler(struct regs *r) { printf("[SYSCALL] %d\n", r->eax); struct proc *a = proc_make(); - bin_load("/a", a); - sti(); - hlt(); + bin_load(++i ? "/a" : "/b", a); + strcpy(a->name, "a"); + proc_print(); } void syscall_init() -- cgit v1.2.3