CeDOS - Commit 99a01ca0

Fixed some things
Celina Sophie Kalus
Sun, 14 Jan 2018 00:09:02 +0100
3 files changed, 8 insertions(+), 10 deletions(-)
M kernel/core.ckernel/core.c

@@ -77,7 +77,7 @@ printk(" ESI=%i EDI=%i ESP=%i EBP=%i\n", esi, edi, esp, ebp);

} void printk(const char* fmt, ...) { - crit_enter(); + //crit_enter(); va_list args; va_start(args, fmt); uint32_t index = 0;

@@ -107,7 +107,7 @@

fmt++; } - crit_exit(); + //crit_exit(); } void kpanic(const char* string) {

@@ -126,7 +126,7 @@ cli();

} void crit_exit(void) { - set_eflags(eflags); + set_eflags(eflags); } int core_init(void) {
M kernel/main.ckernel/main.c

@@ -51,17 +51,15 @@ extern uint8_t* IDT;

void task1(void) { //outb(0xFE, 0x64); - printk("Somebody once told me\n"); + while (1) { printk("Somebody once told me\n"); hlt(); } } void task2(void) { - printk("The world is gonna roll me\n"); + while (1) { printk("The world is gonna roll me\n"); hlt(); } } void task3(void) { - printk("I ain't the sharpest tool in the shed.\n"); - cli(); - while (1); + while (1) { printk("I ain't the sharpest tool in the shed.\n"); hlt(); } } int os_main(void) {
M kernel/sched.ckernel/sched.c

@@ -71,14 +71,14 @@ }

// select next process static int pid = 0; - pid = (pid + 1) % 4; + pid = pid % 3 + 1; current_pid = pid; printk("\n### SCHEDULER: SWITCH TO TASK %i\n", pid); // prepare to return to process - switch_page_dir(process->page_dir); process = get_process(current_pid); + switch_page_dir(process->page_dir); frame = (volatile SCHED_FRAME*)(process->esp); ebp = process->ebp; frame->eip = process->eip;