Disable hardware interrupts
#include <sys/neutrino.h> void InterruptDisable( void );
libc
Use the -l c option to qcc to link against this library. This library is usually included automatically.
The InterruptDisable() function disables all hardware interrupts. You can call it from a thread or from an interrupt handler. Before calling this function, the thread must:
ThreadCtl( _NTO_TCTL_IO, 0 );
If the thread doesn't do these things, it might SIGSEGV when it calls InterruptDisable().
Reenable the interrupts by calling InterruptEnable().
Use InterruptDisable() instead of an inline cli to ensure hardware portability with non-x86 CPUs.
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | Yes |
Signal handler | Yes |
Thread | Yes |