Putting artificial delays in a char driver

Mandeep Sandhu mandeepsandhu.chd at gmail.com
Fri May 20 02:43:42 EDT 2011


> Regarding bottom/top halves, modern 2.6 kernels have so called threaded
> interrupts. This basically means that when an IRQ is triggered, the ISR is
> already executing in a thread. So, if you use threaded IRQ's you don't quite
> have to worry about bottom/top halves of old.  You can even use mutexes (not
> spinlocks) in the ISR. I believe that the threaded interrupts will generate
> some small delay before the ISR is executed, but if memory serves me right
> it's basically too small to matter in the most cases.

Thanks for pointing this out. Didn't we now have threader IRQs! Nice.

> I think that the solution described by Felix Varghese, is a quite good
> solution. By triggering the timer in the ISR function, it will be lit
> constantly if there is very much IR communications going on.

True. Using timers now. It's quite simple to use and looks
clean...plus my fxn that toggles the LED states are quite simple/basic
and have no resource locking requirements so no worries of race cond's
too.

Thanks,
-mandeep

>
> BRs,
> /Jocke!
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>



More information about the Kernelnewbies mailing list