Page 1 of 1

Has anybody seen my timer?

Posted: Sun Jun 03, 2012 11:45 am
by rspencer
I am following jmolloy's (very good) tutorial and have just finished multitasking. When I run it, I get the text output twice (yay!) but then I notice that my timer never ticks again (I have a display of my timer count).

Does anybody know why this is happening? Are interrupts disabled somewhere inexplicitly?

As far as I can see, the code (which forks, then prints stuff then while(true)'s) should print stuff twice then keep switching back and forth between the two tasks, which are both in infinite loops. Am I wrong?

Many thanks

Re: Has anybody seen my timer?

Posted: Sun Jun 03, 2012 12:21 pm
by NickJohnson
Are you sending the end-of-interrupt command to the PIC properly after handling the timer interrupt?

Re: Has anybody seen my timer?

Posted: Sun Jun 03, 2012 12:29 pm
by rspencer
I seem to be doing so before handling the timer. My IRQ sends the EOI and then calls my function.

Re: Has anybody seen my timer?

Posted: Mon Jun 04, 2012 9:11 am
by rspencer
Aha! Copied the code from the tutorial *shudder* to see if it was me and got a page fault... Meh. Looked it up and found : http://forum.osdev.org/viewtopic.php?f= ... 03&start=0
So that pretty much does for this thread I think. Thanks anyway!