From fe4280eb69fbeb386b5442b3aeb515dde1c117ec Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Mon, 11 May 2020 22:45:08 +0200 Subject: Some scheduling improvements And other stuff.. --- src/userspace/programs/init.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'src/userspace/programs/init.c') diff --git a/src/userspace/programs/init.c b/src/userspace/programs/init.c index 019e5c3..7a4900b 100644 --- a/src/userspace/programs/init.c +++ b/src/userspace/programs/init.c @@ -21,10 +21,10 @@ int interrupts_enabled() void main() { - /* if (get_pid() != 1) { */ - /* printf("Wrong PID!\n"); */ - /* exit(1); */ - /* } */ + if (get_pid() != 1) { + printf("Wrong PID!\n"); + exit(1); + } if (interrupts_enabled()) printf("INTs enabled :)\n"); @@ -38,12 +38,9 @@ void main() // TODO: Fix occasional race conditions with cli/sti // TODO: Fix scheduler turning off at some point spawn("/bin/sh"); - if (interrupts_enabled()) - printf("INTs enabled :)\n"); - else - printf("INTs disabled :(\n"); + printf("Looping in init\n"); while (1) { - printf("B"); + //printf("B"); }; } \ No newline at end of file -- cgit v1.2.3