i_set_interrupt or _DSPEXEC_ISR - install an interrupt service routine (ISR)
#include <sys/interrupt.h>
The i_set_interrupt() primitive binds the interrupt service routine specified as handler to the processor specific interrupt vector.
i_set_interrupt() is used when the ISR needs to make kernel calls (for Unison). The ISR will return through the dispatcher and may cause a context switch. If the ISR does not make kernel calls, (e.g. it only sets a global variable) it is more efficient to install the ISR directly.
The meaning of arg is processor specific.
_DSPEXEC_ISR is a macro that binds an interrupt service routine to a specific interrupt (only for DSPnano kernel). It is used on processors where interrupt vectors are not dynamically assignable and must be assigned at link time.
Upon successful completion, i_set_interrupt() returns 0; otherwise, function returns -1 and set errno to indicate the error condition.
_DSPEXEC_ISR is a macro which is translated into a
compiler or linker directive and will return errors at compile or
link time if used incorrectly.
The ISR handler must follow C calling conventions, but can be written in assembler.