[En-Nut-Discussion] Cortex ih_xxx_interuptY code duplication, continued

Ole Reinhardt ole.reinhardt at embedded-it.de
Thu Jul 26 21:51:31 CEST 2012

Hi Uwe,

> So for shared interrupts like above we either need a complement to
> GpioRegisterIrqHandler() and GPIO_SIGNAL like RegisterSharedIrqHandler() and
> SHARED_SIGNAL or we need a good idea how to extend NutRegisterIrqHandler().

What about the same approach Linux goes?

You can register as much IRQ handlers to one IRQ as you like. Every
handler now has to return if it handled the IRQ or not. As long as the
IRQ was not handled the next handler will be called.

This way we would have to handle a linked list of IRQ handlers for each
IRQ. In most cases this will end up in just a single call which does not
add (much) cycles to the IRQ handling at all.

Just an Idea. I'll try to setup a demo implementation tomorrow, which
might make thinks a little clearer.




Thermotemp GmbH, Embedded-IT

Embedded Hard-/ Software and Open Source Development, 
Integration and Consulting


Geschäftsstelle Siegen - Steinstraße 67 - D-57072 Siegen - 
tel +49 (0)271 5513597, +49 (0)271-73681 - fax +49 (0)271 736 97

Hauptsitz - Hademarscher Weg 7 - 13503 Berlin
Tel +49 (0)30 4315205 - Fax +49 (0)30 43665002
Geschäftsführer: Jörg Friedrichs, Ole Reinhardt
Handelsregister Berlin Charlottenburg HRB 45978 UstID DE 156329280 

More information about the En-Nut-Discussion mailing list