InterruptUnlock()
QNX SDP8.0C Library ReferenceAPIDeveloper
Unlock a spinlock and re-enable interrupts
Synopsis:
#include <sys/neutrino.h>
void InterruptUnlock( intrspin_t* spinlock );
Arguments:
- spinlock
- The spinlock used in a call to InterruptLock().
Library:
libc
Use the -l c option to qcc to link against this library. This library is usually included automatically.
Description:
The InterruptUnlock() function releases a critical section by unlocking the specified spinlock, reenabling interrupts.
Before calling this function:
- The process must have the PROCMGR_AID_IO ability enabled. For more information, see procmgr_ability().
- The calling thread must have obtained I/O privileges by calling:
ThreadCtl( _NTO_TCTL_IO_LEVEL, (void*)_NTO_IO_LEVEL_1 );
If you don't do these things, the thread might SIGSEGV when it calls InterruptUnlock().
Note:
This function doesn't support nesting.
If a specific thread calls InterruptLock() multiple times with different
spinlocks and then calls InterruptUnlock() the same number of times
and in reverse order with the locks, the first InterruptUnlock() call
reenables interrupts and the critical section is no longer protected.
Classification:
Safety: | |
---|---|
Cancellation point | No |
Signal handler | Yes |
Thread | Yes |
Page updated: