InterruptMask()
QNX SDP8.0C Library ReferenceAPIDeveloper
Disable a hardware interrupt
Synopsis:
#include <sys/neutrino.h>
int InterruptMask( int intr,
int id );
Arguments:
- intr
- The interrupt you want to mask.
- 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 InterruptMask() kernel call disables the hardware interrupt specified by intr for the thread specified by id.
Reenable the interrupt by calling InterruptUnmask().
To disable all hardware interrupts, use the InterruptLock() function.
Warning: You should avoid writing code that talks directly to the interrupt controller;
use InterruptMask() instead, to ensure hardware portability.
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:
- 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 |
Page updated: