]> www.fi.muni.cz Git - bike-lights.git/commitdiff
Timer handling moved to the main thread
authorJan "Yenya" Kasprzak <kas@fi.muni.cz>
Fri, 7 Jun 2013 16:15:11 +0000 (18:15 +0200)
committerJan "Yenya" Kasprzak <kas@fi.muni.cz>
Fri, 7 Jun 2013 16:15:11 +0000 (18:15 +0200)
In order to mitigate the problem with watchdog reset, possibly caused
by timer IRQ handling taking too long, we only increment the jiffies
value in the WDT IRQ handler, and then read this value in the main
loop, compare with the previous one, and if those two are different,
we run the timer-induced operations. We can (probably) detect the
timer overrun (the difference in jiffies being greater than 1), and log
it.

The individual timer-induced operations are run in their own atomic
blocks for now, in order to be safe. The finer-grained locking is
in the TODO list :-).


No differences found