tasking: make idle task halt
This commit is contained in:
+1
-15
@@ -143,21 +143,7 @@ void kmain(unsigned int magic, unsigned int info)
|
||||
|
||||
while(1)
|
||||
{
|
||||
if(timer_ticks % 1000 == 0)
|
||||
{
|
||||
//printf("a second should have passed!\n");
|
||||
asm("sti; hlt");
|
||||
}
|
||||
|
||||
/* if(inportb(0x64) & 0x1)
|
||||
{
|
||||
unsigned char key = inportb(0x60);
|
||||
if(key == 2)
|
||||
terminal_writestring("1\n");
|
||||
else if(key == 4)
|
||||
terminal_writestring("3\n");
|
||||
else
|
||||
terminal_writestring("dunno what is it\n");
|
||||
}
|
||||
*/ }
|
||||
|
||||
}
|
||||
|
||||
+1
-1
@@ -196,7 +196,7 @@ void schedule() {
|
||||
|
||||
void idle()
|
||||
{
|
||||
while (1) {}
|
||||
while (1) { asm volatile("sti; hlt");}
|
||||
}
|
||||
|
||||
void task1()
|
||||
|
||||
Reference in New Issue
Block a user