## NAME

i_set_interrupt or _DSPEXEC_ISR - install an interrupt service routine (ISR)

## SYNOPSIS

#include <sys/interrupt.h>

int i_set_interrupt(uint_32 vector , void (*handler )(uint_32), uint_32 arg);
void _DSPEXEC_ISR function(void);

## DESCRIPTION

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.

## RETURN VALUES

Upon successful completion, i_set_interrupt() returns 0; otherwise, function returns -1 and set errno to indicate the error condition.

EINVAL
  The value of vector is invalid.

_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.

## NOTES

The ISR handler must follow C calling conventions, but can be written in assembler.

#### Home page (Kernel)

## < Copyright Rowebots Research Inc. and Multiprocessor Toolsmiths Inc. 1987-2018 >