Hi Ravi.
The function itself looks correct, I've done it this way in several
cases, too. However, you MUST make sure that your function1 is not
called while the timer is still running (or protect it by a if
(timer_pending(&period_timer)) return; ). Else the add_timer()
completely messes up the timer list. So, for debugging I'd add the
following:
...
if (timer_pending(&period_timer)) {
printk(KERN_DEBUG "oops, timer still running\n");
return;
}
...
Gruss
Matthias
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/