[Previous] [Contents] [Next]

InterruptUnmask()

Enable a hardware interrupt

Synopsis:

#include <sys/neutrino.h>

int InterruptUnmask( int intr, 
                     int id );

Library:

libc

Description:

The InterruptUnmask() kernel call enables the hardware interrupt specified by intr for the interrupt handler specified by intr for the handler specified by id (which is the ID returned by InterruptAttach() or InterruptAttachEvent()) when the mask count reaches zero. It may be called from a thread or from an interrupt handler. Before calling this function the thread must request I/O privity by calling:

ThreadCtl( _NTO_TCTL_IO, 0 );

If the thread doesn't do this, it might SIGSEGV when InterruptUnlock() is called.

Calls to InterruptMask() are nested; the interrupt won't be unmasked until InterruptUnmask() has been called once for every call to InterruptMask().


Note: The id can be -1 if you don't want the kernel to track interrupt masks and unmasks for each handler.

The id is ignored unless you use the _NTO_INTR_FLAGS_TRK_MSK flag in the InterruptAttach() call.


Returns:

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

Errors:

EINVAL
Not a supported hardware interrupt intr.

Classification:

QNX 6

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

See also:

InterruptAttach(), InterruptDisable(), InterruptEnable(), InterruptLock(), InterruptMask(), InterruptUnlock() ThreadCtl()


[Previous] [Contents] [Next]