tty_unlock()
Unlock the TTYCTRL structure to allow modifications by other threads
Synopsis:
#include <sys/io-char.h>
int tty_unlock( TTYCTRL *ctrl );Arguments:
- ctrl
- A pointer to TTYCTRL structure to be unlocked.
Description:
The tty_unlock() function unlocks the TTYCTRL structure to allow modifications by other threads. The structure lock should be owned by the calling thread. If there are threads blocked on the structure lock then the highest priority waiting thread is unblocked and becomes the next owner of the structure. If the thread's priority was raised when a higher-priority thread attempted to lock the structure, the calling thread's priority is again adjusted when it unlocks it; its new priority is the maximum of its own priority and the priorities of those threads it still blocks, either directly or indirectly.
Returns:
- EOK
- Success.
- EINVAL
- The structure locking mechanism is corrupted.
- EPERM
- The current thread doesn't own the structure lock.
Classification:
QNX OS
| Safety: | |
|---|---|
| Cancellation point | No |
| Signal handler | No |
| Thread | Yes |
