Wait on a sleepon lock
#include <pthread.h> int _sleepon_wait( sleepon_t * l, const volatile void * addr, uint64_t nsec);
Use the -l c option to qcc to link against this library. This library is usually included automatically.
The _sleepon_wait() function blocks on the sleepon l using the key addr until woken up by either a _sleepon_signal() or a _sleepon_broadcast() call that uses the same addr key.
The calling thread must first have locked the sleepon by calling _sleepon_lock().
When the thread returns from this function, it must release the sleepon lock by calling _sleepon_unlock().
_sleepon_broadcast(), _sleepon_lock(), _sleepon_unlock(), _sleepon_signal()