Signal a sleeping thread
#include <pthread.h> int pthread_sleepon_signal( const volatile void * addr );
Use the -l c option to qcc to link against this library. This library is usually included automatically.
The pthread_sleepon_signal() function unblocks the highest priority thread waiting on addr.
You should use pthread_sleepon_broadcast() or pthread_sleepon_signal(), depending on the task you're doing:
If you use pthread_sleepon_broadcast(), you must recheck the predicate and reblock if necessary. The first thread to wake up owns the lock; all others must go back to sleep.
If you use pthread_sleepon_signal(), you don't have to recheck the predicate. One thread owns the lock at a time.
Don't use pthread_sleepon_signal() in this case; it could result in a deadlock.
pthread_cond_signal(), pthread_sleepon_broadcast(), pthread_sleepon_lock(), pthread_sleepon_unlock(), pthread_sleepon_wait()
Processes and Threads chapter of Getting Started with QNX Neutrino