I've got my multitasking working and it is working - well nice enough.
Now I encountered a "how is this even possible" kind of issue.
So basically, I have three threads that just "hlt" in a loop - their page directories are all linked above 3Gb mark and each has its own stack.
My IRQ0 event handler looks like this:
Code: Select all
Ticks++;
if(Ticks%1000==0)
{
*Graphics::GetConsole()<<Ticks<<endl;
}
...
Any ideas on how it's possible? I have verified that Ticks points to the same physical address in all threads, and also interrupts are disabled in the IRQ stub.