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 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 enables the hardware interrupt specified by intr for the interrupt thread specified by id when the mask count reaches zero.
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.
- EINVAL
- The value of intr isn't a supported hardware interrupt.
- ENOTSUP
- The value of id is -1.
- ESRCH
- The id parameter is not returned by InterruptAttachThread(), InterruptAttachEvent(), or InterruptAttachEventPriority().
Classification:
Safety: | |
---|---|
Cancellation point | No |
Signal handler | Yes |
Thread | Yes |