Cnd_broadcast
cnd_broadcast is a C threads-library function that wakes all threads waiting on a condition variable.
Modern C, Third Edition
cnd_broadcast is a C threads-library function that wakes all threads waiting on a condition variable.
- How it is used
- Coordinates all threads waiting for a condition variable when shared-state changes require each waiter to recheck its condition.
- How deep it goes
- Defines wake-all behavior, wait-loop discipline, and mutex-mediated visibility without presenting a dedicated broadcast implementation.
- Examples
- Uses a draw-thread wait loop and the C condition-variable declarations to illustrate notification and condition rechecking.
- What you can do after
- Apply it via C condition-variable interfaces while preserving shared-state visibility through the waiters’ mutex.
Modern C
cnd_broadcast is a C11 condition-variable function that wakes all threads waiting on a condition variable.
- How it is used
- Coordinates threads by waking every waiter when shared state may satisfy their condition.
- How deep it goes
- Defines wakeup behavior and mutex discipline, while deferring implementation internals.
- Examples
- Uses input, account, update, and draw threads with predicate-checking wait loops.
- What you can do after
- Apply it via the C11 condition-variable API while protecting shared state with the associated mutex.
Related concepts
- condition variableuses · A condition variable is a synchronization object that allows threads to wait for a shared-state condition and be notified when it may have changed.
- cnd_signalcontrasts with · cnd_signal is a C threads-library function that wakes one thread waiting on a condition variable.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

