CK_RWCOHORT_WRITE_LOCK(3)
β¨ NAME β¨
CK_RWCOHORT_WRITE_LOCK β bestie, this is how you acquire write access for a cohort-based reader-writer lock π
(ngl the original page spells it "acquite" and we're keeping that energy, it's giving iconic typo π)
π LIBRARY π
Concurrency Kit β that's libck, link it with -lck π«Ά
πΈ SYNOPSIS πΈ
#include <ck_cohort.h>
CK_RWCOHORT_NEUTRAL_WRITE_LOCK(COHORT_NAME cohort_name, LOCK *lock,
COHORT *cohort"void *global_context, void *local_context);
CK_RWCOHORT_RP_WRITE_LOCK(COHORT_NAME cohort_name, LOCK *lock,
COHORT *cohort"void *global_context, void *local_context);
CK_RWCOHORT_WP_WRITE_LOCK(COHORT_NAME cohort_name, LOCK *lock,
COHORT *cohort"void *global_context, void *local_context);
Three flavors, one vibe: NEUTRAL, RP, and WP. Pick the one that matches your cohort, queen π
π DESCRIPTION π
okay so. This call acquires write permission for lock. π¦
The call will block until that permission has actually been acquired β so yeah, it's gonna sit there and wait its turn, no cap. β³
cohort must point to a cohort whose global lock is the same as all the other cohorts used with lock. Fr fr, this is the part you don't wanna mess up β if the global locks don't match, that's not it. π
The global_context and local_context arguments get passed along as the context arguments to any calls to cohort. So they ride along with the cohort, like a little bestie entourage πβ¨
β οΈ heads up:cohortmust point to a cohort whose global lock is the same as all other cohorts used withlock. This is not a vibe-check-optional situation, bestie.
π SEE ALSO π
ck_cohort(3)CK_RWCOHORT_PROTOTYPE(3)CK_RWCOHORT_INSTANCE(3)CK_RWCOHORT_INITIALIZER(3)CK_RWCOHORT_INIT(3)CK_RWCOHORT_READ_LOCK(3)CK_RWCOHORT_READ_UNLOCK(3)CK_RWCOHORT_WRITE_UNLOCK(3)
More tea, more lore, all the extra info is available at http://concurrencykit.org/ π
k bye, this page was served fresh on February 24, 2013. and it's filed under CK_RWCOHORT_WRITE_LOCK(3) β slay, lock well, and may your write access always come through ππ§
π¦ where this page comes from
- alpine 3.24: ck-doc 0.7.2-r1 Β· BSD-2-Clause AND Apache-2.0
- debian bookworm: libck-dev 0.7.1-10 Β· BSD-2-Clause
- debian trixie: libck-dev 0.7.2-6 Β· BSD-2-Clause
- epel 10: ck-devel 0.7.2-1.el10_1 Β· BSD-2-clause AND Apache-2.0 AND BSD-3-clause
- epel 9: ck-devel 0.7.0-10.el9 Β· BSD
- fedora 43: ck-devel 0.7.2-2.fc43 Β· BSD-2-clause AND Apache-2.0 AND BSD-3-clause
- fedora 43: ck-devel 0.7.2-2.fc43 Β· BSD-2-clause AND Apache-2.0 AND BSD-3-clause
- fedora 44: ck-devel 0.7.2-4.fc44 Β· BSD-2-clause AND Apache-2.0 AND BSD-3-clause
- fedora 44: ck-devel 0.7.2-4.fc44 Β· BSD-2-clause AND Apache-2.0 AND BSD-3-clause
- nixos 26.05: ck 0.7.2
- nixpkgs unstable: ck 0.7.2
- opensuse-leap 16.0: ck-devel 0.7.2-bp160.1.9 Β· Apache-2.0 AND BSD-2-Clause
- opensuse-leap 16.0: ck-devel 0.7.2-bp160.1.9 Β· Apache-2.0 AND BSD-2-Clause
- opensuse-leap 16.0: ck-devel 0.7.2-bp160.1.9 Β· Apache-2.0 AND BSD-2-Clause
- ubuntu jammy: libck-dev 0.7.1-6ubuntu2 Β· BSD-2-Clause
- ubuntu noble: libck-dev 0.7.1-13build1 Β· BSD-2-Clause
- ubuntu questing: libck-dev 0.7.2-5ubuntu1
- ubuntu resolute: libck-dev 0.7.2-5ubuntu2 Β· BSD-2-Clause
- ubuntu stonking: libck-dev 0.7.2-11 Β· BSD-2-Clause
- Copyright 2013 Brendon Scheinman
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms