BSP and Device Driver Development Guide
The set_vector
routine is responsible for installing an interrupt
vector. It invokes the support routines necessary to install an
interrupt handler as either a "raw" or an RTEMS interrupt handler. Raw
handlers bypass the RTEMS interrupt structure and are responsible for
saving and restoring all their own registers. Raw handlers are useful
for handling traps, debug vectors, etc..
The set_vector
routine is a central place to perform
interrupt controller manipulation and encapsulate that information.
It is usually implemented as follows:
rtems_isr_entry set_vector( /* returns old vector */ rtems_isr_entry handler, /* isr routine */ rtems_vector_number vector, /* vector number */ int type /* RTEMS or RAW intr */ ) { if the type is RAW install the raw vector else use rtems_interrupt_catch to install the vector perform any interrupt controller necessary to unmask the interrupt source return the previous handler }
NOTE: set_vector
is provided by the majority of BSPs but
not all. In particular, the i386 BSPs use a different scheme.
BSP and Device Driver Development Guide
Copyright © 1988-2007OAR Corporation