Has anybody seen my timer?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
rspencer
Posts: 18
Joined: Wed Feb 03, 2010 12:05 am

Has anybody seen my timer?

Post 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
User avatar
NickJohnson
Member
Member
Posts: 1249
Joined: Tue Mar 24, 2009 8:11 pm
Location: Sunnyvale, California

Re: Has anybody seen my timer?

Post by NickJohnson »

Are you sending the end-of-interrupt command to the PIC properly after handling the timer interrupt?
rspencer
Posts: 18
Joined: Wed Feb 03, 2010 12:05 am

Re: Has anybody seen my timer?

Post by rspencer »

I seem to be doing so before handling the timer. My IRQ sends the EOI and then calls my function.
rspencer
Posts: 18
Joined: Wed Feb 03, 2010 12:05 am

Re: Has anybody seen my timer?

Post 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!
Post Reply