Release a critical section in an interrupt handler
#include <sys/neutrino.h> void InterruptUnlock( intrspin_t* spinlock );
libc
Use the -l c option to qcc to link against this library. This library is usually included automatically.
The InterruptUnlock() function releases a critical section by unlocking the specified spinlock, reenabling interrupts. You can call this function from a thread or from an interrupt handler.
Before calling this function, the thread must request I/O privileges by calling:
ThreadCtl( _NTO_TCTL_IO, 0 );
If the thread doesn't do this, it might SIGSEGV when it calls InterruptUnlock().
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | Yes |
Signal handler | Yes |
Thread | Yes |
InterruptDisable(), InterruptEnable(), InterruptLock(), InterruptMask(), InterruptUnmask(), ThreadCtl()
Writing an Interrupt Handler chapter of the Neutrino Programmer's Guide
Interrupts chapter of Getting Started with QNX Neutrino