Chaining ISRs

Is there any notion of interrupt chains with Arduino?

While this could be useful in some contexts like chaining to the timer0 overflow interrupt, I was wondering about this with regard to pin change interrupts specifically.

Pin change interrupts are organized into banks of pins. If library A and library B both want to service pin change interrupts on two pins in the same bank there will be a problem when they both try to define an ISR for the same interrupt. What should be possible is for one ISR to pass control to the next.

What makes it worse is that if the pin is determined after compile time, as appears to be the norm for libraries, then ALL of the possible pin change interrupt ISRs have to be declared by the library. This effectively blocks the use of any of the other pin change interrupts, just by using one of them in one library.

Is this just not an issue very often?

I think it is an issue from time to time, for example if you use SoftwareSerial.

It would be hard indeed to make every library work with every other one. The pin change interrupts are just one example. Two libraries both might want to user Timer 1, and for different purposes (eg. speeds).

Is there any notion of interrupt chains with Arduino?

No, not that I am aware of.

Thanks for the response.

It was SoftwareSerial that got me thinking about this.

Do you know where the ISR() macro is defined? I can't find seem to find it.

On Windows:

<path to install>\hardware\tools\avr\avr\include\avr\interrupt.h