Commit 83769971 by malcolm

idk what im doing

parent 77d4fa74
......@@ -31,7 +31,9 @@ void schedule()
{
curproc=(curproc<NUM_PROCS-1)?curproc+1:0;
}
serial_writestring("about to switch\n");
context_switch(&procs[old]->ctxt, procs[curproc]->ctxt);
serial_writestring("switched\n");
//procs[old]->state=RUNNABLE;
procs[curproc]->state=RUNNING;
//process* t = curproc;
......@@ -44,6 +46,7 @@ int yield()
{
//lock mutex
procs[curproc]->state = RUNNABLE;
serial_writestring("about to schedule\n");
schedule();
//unlock mutex
return 1;
......
No preview for this file type
......@@ -67,11 +67,11 @@ void kernel_main(multiboot_info* mbt, uint32_t magic)
enablePaging();
serial_writestring("Finished Initilizing memory\n");
int o=0;
int j=5/o;
serial_hexword(j);
//int o=0;
//int j=5/o;
//serial_hexword(j);
//test_mem();
serial_writechar('\n');
//serial_writechar('\n');
// PCI
checkAllBuses();
......@@ -86,6 +86,7 @@ void kernel_main(multiboot_info* mbt, uint32_t magic)
pit_init();
pit_start_counter(100, PIT_OCW_CONT_0, PIT_OCW_MODE_SQWVGEN);
serial_writestring("enabling interrupts\n");
enable_int();
......
......@@ -18,6 +18,7 @@ void pit_irq()
pic_command(0, PIC_OCW2_EOI);
//serial_writestring("PIT tickn\n");
//asm volatile("nop;nop;nop;popa; iret;");
serial_writestring("ticked, yielding\n");
yield();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment