InterruptUnmask()
Enable a hardware interrupt
Synopsis:
#include <sys/neutrino.h>
int InterruptUnmask( int reserved,
int id );
Arguments:
- reserved
- Set this argument to zero.
- id
- The value returned by InterruptAttachThread(), InterruptAttachEvent(), InterruptAttachEventPriority().
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 decrements the mask count associated with the attach operation that returned id and when the count reaches zero, enables the hardware interrupt.
To unmask an interrupt once it's finished processing, you must either explicitly call InterruptUnmask(), or have the kernel do so automatically by passing the _NTO_INTR_WAIT_FLAGS_UNMASK when calling InterruptWait().
Calls to InterruptMask() are counted; the interrupt isn't unmasked until InterruptUnmask() has been called once for every call to InterruptMask().
Returns:
EOK for success; or -1 if an error occurs (errno is set).
Errors:
- EAGAIN
- The interrupt is already unmasked.
- ENOTSUP
- The value of id is -1.
- ESRCH
- The id parameter isn't a valid interrupt ID for the calling process.
Classification:
Safety: | |
---|---|
Cancellation point | No |
Signal handler | Yes |
Thread | Yes |