CK_RWCOHORT_READ_LOCK(3)

πŸ’– CK_RWCOHORT_READ_LOCK(3) πŸ’–

okay so bestie, welcome to section 3 of the manual, courtesy of the Concurrency Kit β€” aka libck, aka the girlies who make locks that actually scale πŸ¦‹ this one's all about grabbing read-only permission from a cohort-based reader-writer lock. no cap.


✨ NAME ✨

CK_RWCOHORT_READ_LOCK β€” acquire read-only permission for cohort-based reader-writer lock

πŸ“š LIBRARY πŸ“š

Concurrency Kit (libck, -lck)

πŸŽ€ SYNOPSIS πŸŽ€

#include <ck_cohort.h>

CK_RWCOHORT_NEUTRAL_READ_LOCK(COHORT_NAME cohort_name, LOCK *lock,
    COHORT *cohort"void *global_context, void *local_context);

CK_RWCOHORT_RP_READ_LOCK(COHORT_NAME cohort_name, LOCK *lock,
    COHORT *cohort"void *global_context, void *local_context);

CK_RWCOHORT_WP_READ_LOCK(COHORT_NAME cohort_name, LOCK *lock,
    COHORT *cohort"void *global_context, void *local_context);
bestie, notice that lil " in there? that's literally what's in the page. copying it exactly, not my job to fix it, my job is to be faithful πŸ’…

🌸 DESCRIPTION 🌸

so this call acquires read-only permission from lock. 🫢 and it's not gonna just hand it over instantly β€” the call will block until that permission has actually been acquired. patient queen energy.

cohort must point to a cohort whose global lock is the same as all other cohorts used with lock. like, they all have to be in the same group chat, fr fr β€” mismatched global locks is not the vibe.

the global_context and local_context arguments get passed along as the context arguments to any calls to cohort. so they travel with you, iconic. ✨


πŸ‘€ SEE ALSO πŸ‘€

Additional information available at http://concurrencykit.org/


okay that's the whole page, and yeah, it's dated February 24, 2013 and lives in the CK_RWCOHORT_READ_LOCK(3) era of the manual β€” vintage but still ate. πŸ’œ go forth and lock responsibly, bestie. periodt. πŸŒˆπŸ‘‘

πŸ“¦ where this page comes from