InterruptMask()
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.
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.
- EXDEV
-
The id is for a CPU-local interrupt, but the calling thread doesn't have its runmask set to the same CPU it was set to when attaching to the interrupt.
Classification:
Safety: | |
---|---|
Cancellation point | No |
Signal handler | Yes |
Thread | Yes |