Wake up any threads that are blocked on a synchronization object
#include <sys/neutrino.h> int SyncCondvarSignal( sync_t *condvar, int broadcast ); int SyncCondvarSignal_r( sync_t *condvar, int broadcast );
libc
Use the -l c option to qcc to link against this library. This library is usually included automatically.
The SyncCondvarSignal() and SyncCondvarSignal_r() kernel calls wake up one or all threads that are blocked on the condition variable, condvar.
These functions are similar, except in the way they indicate errors. See the Returns section for details.
In all cases, each awakened thread attempts to reacquire the controlling mutex passed in SyncCondvarWait() before control is returned to the thread. If the mutex is already locked when the kernel attempts to lock it, the thread becomes blocked on the mutex until it's unlocked.
Blocking states
These calls don't block.
The only difference between these functions is the way they indicate errors:
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | No |
Signal handler | Yes |
Thread | Yes |