Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://www.arcetri.astro.it/irlab/doc/library/linux/khg/HyperNews/get/khg/172.html
Дата изменения: Thu Mar 23 12:37:46 2000 Дата индексирования: Wed Sep 15 00:50:27 2010 Кодировка: Поисковые слова: р п р п р п р п р п р п р п |
I've been playing around with the add_timer and del_timer functions and can't seem to get it to work. Say if I want to execute a IRQ routine using a 10sec timer for 10 times, only the first time there is a 10 sec delay, but subsiquent interrupts are simultaneous.
static struct timer_list timer = { NULL, NULL, INTERVAL, 0L, &irq }; main() { add_timer(&timer); } irq() { del_timer(&timer); timer.expires = INTERVAL; add_timer(&timer); printk(KERN_DEBUG "Hello."); } Is there any documentation on timers? Appreciate all the help I can get. I have a project that needs this and I'm stuck. Thanks.
|