cBroadcast(3)
π cBroadcast β a util/ulocks.h moment π
okay bestie, so we're in section 3 of the manual (the library-call girlies π«Ά), and this one lives in util/ulocks.h β the ClearSilver util lock crew. her whole thing? she yells at everyone. in a good way. π
β¨ NAME β¨
cBroadcast β broadcast signal to all waiting threads.
like, not one thread. not two. all of them. she's a group-chat announcement, not a DM. π£
πΈ SYNOPSIS πΈ
#include <util/ulocks.h>
NEOERR *cBroadcast(pthread_cond_t *cond);
yes queen, that's the whole signature. one arg, one NEOERR * coming back at you. β¨
π ARGUMENTS π
condβ condition variable to broadcast on. that's thepthread_cond_tyou're screaming into. it's giving "the group chat". π¬
π¦ DESCRIPTION π¦
Broadcasts a signal to all threads waiting on condition variable cond.
so picture it: a bunch of threads are sitting there in cWait(3), parked, napping, not doing a single thing. cBroadcast walks in and goes "EVERYONE UP" and every single one of them gets the signal. not a lottery, not a raffle, everybody. π
MT-Level: Safe.
(translation: she's thread-safe, she's well-behaved, she knows what she's doing, no cap. π§)
π RETURN VALUE π
None.
literally nothing comes back. she returns, that's it. no NEOERR drama to check, no "did it work" moment. it just works. periodt. π
π SEE ALSO π
the whole friend group, go say hi:
mCreate(3)fCreate(3)mUnlock(3)fUnlock(3)cBroadcast(3)β yes she's linking herself, main character energy fr fr πcSignal(3)fFind(3)cDestroy(3)cCreate(3)mDestroy(3)cWait(3)fLock(3)fDestroy(3)mLock
lowkey if you're deciding betweencSignal(3)andcBroadcastβ one wakes a thread, the other wakes all of them. choose accordingly, bestie, don't play yourself. π
okay that's the page!! π this one came from ClearSilver, dated 12 July 2007 β an absolute icon, she's been slaying since '07 and we're obsessed. mwah πβ¨π
π¦ where this page comes from
- debian bookworm: clearsilver-dev 0.10.5-4+b5
- debian trixie: clearsilver-dev 0.10.5-6+b1
- epel 10: clearsilver 0.10.5-80.el10_2 Β· Apache-1.1
- epel 9: clearsilver 0.10.5-74.el9 Β· Apache-1.1
- fedora 43: clearsilver 0.10.5-80.fc43 Β· Apache-1.1
- fedora 44: clearsilver 0.10.5-82.fc44 Β· Apache-1.1
- ubuntu jammy: clearsilver-dev 0.10.5-4build3
- ubuntu noble: clearsilver-dev 0.10.5-4build7
- ubuntu questing: clearsilver-dev 0.10.5-6build1
- ubuntu resolute: clearsilver-dev 0.10.5-7
- ubuntu stonking: clearsilver-dev 0.10.5-7build1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms