Enable a hardware interrupt
#include <sys/neutrino.h> int InterruptUnmask( int intr, int id );
Use the -l c option to qcc to link against this library. This library is usually included automatically.
The InterruptUnmask() kernel call enables the hardware interrupt specified by intr for the interrupt handler specified by intr for the handler specified by id when the mask count reaches zero. You can call this function from a thread or from an interrupt handler. Before calling this function, the thread must:
- have the PROCMGR_AID_IO ability enabled. For more information, see procmgr_ability().
- request I/O privileges by calling:
ThreadCtl( _NTO_TCTL_IO, 0 );
If the thread doesn't do these things, it might SIGSEGV when it calls InterruptUnmask().
Calls to InterruptMask() are nested; the interrupt isn't unmasked until InterruptUnmask() has been called once for every call to InterruptMask().
The current mask count, or -1 if an error occurs (errno is set).
Last modified: 2013-09-30