lkml.org 
[lkml]   [2001]   [May]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectTimers
I'm having some major headaches trying to get a timer working in my
driver.

The timer is started when the device node is opened, and deleted when it's
closed. The timer code itself calls mod_timer to add itself back in
again. At the moment, it runs every second and does nothing more than
issue a debug printk to say it's working okay.

The problem comes when I try and wrap the timer code inside some down()
and up() calls to make sure it's not fiddling with the hardware at the
same time as some other calls. When I do this, I get a huge oops which
goes right off my screen and I get the "Aieee..." message afterwards and I
have to push the reset button :(.

Should I be using spin_(un)lock_irqsave() calls anywhere instead of just a
semaphore? Or is there anything else I should be doing?

Cheers

Matt

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:52    [from the cache]
©2003-2011 Jasper Spaans