InterruptMask()
QNX SDP8.0C Library ReferenceAPIDeveloper
Disable a hardware interrupt
Synopsis:
#include <sys/neutrino.h>
int InterruptMask( 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 InterruptMask() kernel call disables the hardware interrupt associated with the interrupt attach operation that returned 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:
- 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 |
Page updated: