Further considerations for synchronization mechanisms
There is no protection against ``priority inversion''.
When a thread holds a lock,
it keeps its priority even if a higher priority thread
is waiting for that lock.
Therefore, a low priority thread can prevent a thread
of higher priority from running.
thr_exit(3thread)
does not release any locks a thread may have acquired.
There is no automatic protection from deadlock
(except for the limited protection provided by recursive mutexes).
If a caught signal is received by a thread while blocked on a synchronization
mechanism (other than a condition variable):
The signal handler is called.
The blocked function call is transparently re-started.
The function does not return with EINTR.
Condition variables are the single exception.
A call to cond_wait or cond_timedwait
will be abnormally terminated on receipt of a signal,
and EINTR will be returned.
Each mechanism (except barriers) has a conditional _try variant
that will not block
when the resource is unavailable;
error condition EBUSY is returned instead.