ISRs (Interrupt Service Routines)


Like all RTOS's, VxWorks provides facilities for installation and management of Interrupt Service Routines. An application will need to specify an ISR, install it (using OS API calls) and connect and disconnect it as appropriate.

This article only contains tips and tricks. Mandatory reading for this subject is "VxWorks Kernel Programmer's Guide, 6.3", section 3.5 Interrupt Service Routines"

Mapping interrupt number to interrupt vector

The macro INUM_TO_IVEC(int inum) can be used to map an interrupt number to an interrupt vector. This macro is defined in either intLib.h or iv.h (TBD). Remember that the first interrupt numbers are reserved for the system, so inum must be offset.

Enabling and disabling interrupts

Enable and disable interrupts using the pentium-BSP-specific routine sysIntEnablePIC() and sysIntDisablePIC()

Object-oriented wrapping of ISRs

A wrapping of ISRs can be made. As the source code is a dead give-away in terms of how to use ISRs, the code is only available upon request. Contact TFJ