Cnd_signal
cnd_signal is a C threads-library function that wakes one thread waiting on a condition variable.
Modern C, Third Edition
cnd_signal is a C threads-library function that wakes one thread waiting on a condition variable.
- How it is used
- Coordinates producer-and-consumer-style thread progress by waking one waiter after protected shared-state changes.
- How deep it goes
- Explains wakeup behavior, condition loops, mutex coupling, and mutex-mediated synchronization, but not implementation internals.
- Examples
- Demonstrates account, update, and draw threads signaling condition variables while coordinating shared game state.
- What you can do after
- Operate/configure it to wake one correctly synchronized waiter without assuming that waking proves the condition.
Modern C
cnd_signal is a C11 condition-variable function that wakes one thread waiting on a condition variable.
- How it is used
- Coordinates worker threads by notifying one waiter that shared-state work may now be available.
- How deep it goes
- Explains single-waiter wake-up and guarded rechecking, while deferring broader condition-variable implementation details.
- Examples
- Uses account, update, and draw threads that signal one another after protected work completes.
- What you can do after
- Apply via cnd_signal to notify one condition-variable waiter while preserving a loop that validates the shared condition.
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.
- lockinguses · Locking is a synchronization technique that restricts concurrent access to shared resources or protected operations.
- cnd_broadcastcontrasts with · cnd_broadcast is a C threads-library function that wakes all threads waiting on a condition variable.
- cnd_tuses · cnd_t is a C threads-library type representing a condition-variable object used for thread waiting and notification.
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.

