CK_COHORT_INIT(3)

CK_COHORT_INIT3

Initialize instance of a cohort type

Usage

#include <ck_cohort.h>

CK_COHORT_INIT(COHORT_NAME cohort_name, COHORT *cohort, void *global_lock, void *local_lock, unsigned int pass_limit);

Library

Concurrency Kit (libck, -lck)

Overview

Until a cohort instance is initialized using the CK_COHORT_INIT macro, any operations involving it will have undefined behavior. After this macro has been called, the cohort pointed to by the cohort argument will use the lock pointed to by global_lock as its global lock and the lock pointed to by local_lock as its local lock.

The cohort will relinquish its global lock after pass_limit consecutive acquisitions of its local lock, even if there are other threads waiting. If you are unsure of a value to use for the pass_limit argument, you should use CK_COHORT_DEFAULT_LOCAL_PASS_LIMIT.

Releases

5 releases since Debian 8 (Jessie); the text changed 1 time.

  1. 8
  2. 9–13

From libck-dev 0.7.2-6 in Debian 13 (Trixie). Parsed by carta from the page's mdoc source.