InterruptUnmask()

Enable a hardware interrupt

Synopsis:

#include <sys/neutrino.h>

int InterruptUnmask( int intr, 
                     int id );

Arguments:

intr
The interrupt you want to unmask.
id
The value returned by InterruptAttach(), InterruptAttachArray(), or InterruptAttachEvent(), or -1 if you don't want the kernel to track interrupt maskings and unmaskings for each handler.
Note: The id is ignored unless you use the _NTO_INTR_FLAGS_TRK_MSK flag when you attach the handler.

Library:

libc

Use the -l c option to qcc to link against this library. This library is usually included automatically.

Description:

The InterruptUnmask() kernel call enables the hardware interrupt specified by intr for the interrupt 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:

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().

Returns:

The current mask count, or -1 if an error occurs (errno is set).

Errors:

EINVAL
Not a supported hardware interrupt intr.
ESRCH
The id parameter is neither something returned by InterruptAttach(), InterruptAttachArray(), or InterruptAttachEvent(), nor -1.
EPERM
The function was called from a thread other than the one that called one of the InterruptAttach*() functions and obtained id, or the caller didn't request I/O privileges by first calling ThreadCtl( _NTO_TCTL_IO, 0 ).

Classification:

QNX Neutrino

Safety:  
Cancellation point No
Interrupt handler Yes
Signal handler Yes
Thread Yes