CK_RWCOHORT_INSTANCE (3) - Linux Manuals
CK_RWCOHORT_INSTANCE: declare an instance of a cohort-based reader-writer lock type
NAME
CK_RWCOHORT_INSTANCE - declare an instance of a cohort-based reader-writer lock typeLIBRARY
Concurrency Kit (libck, -lck)SYNOPSIS
In ck_cohort.h Fn CK_RWCOHORT_NEUTRAL_INSTANCE COHORT_NAME cohort_name Fn CK_RWCOHORT_RP_INSTANCE COHORT_NAME cohort_name Fn CK_RWCOHORT_WP_INSTANCE COHORT_NAME cohort_nameDESCRIPTION
The user must use this macro to declare instances of lock types that they have defined using the CK_RWCOHORT_PROTOTYPE3 macro. The cohort_name must be the same as the one used in the prototype macro. For instance, if CK_RWCOHORT_PROTOTYPE was called with the name "foo", the CK_RWCOHORT_INSTANCE macro should be called asCK_RWCOHORT_INSTANCE(foo) cohort;
This macro should also be used when allocating memory for cohorts. For instance,
to allocate a block of 4 cohorts:
CK_RWCOHORT_WP_INSTANCE(foo) *cohorts = malloc(4 * sizeof(CK_RWCOHORT_WP_INSTANCE(foo)));
SEE ALSO
ck_rwcohort3, CK_RWCOHORT_PROTOTYPE3, CK_RWCOHORT_TRYLOCK_PROTOTYPE3, CK_RWCOHORT_INSTANCE3, CK_RWCOHORT_INITIALIZER3, CK_RWCOHORT_LOCK3, CK_RWCOHORT_UNLOCK3, CK_RWCOHORT_LOCKED3, CK_RWCOHORT_TRYLOCK3,Additional information available at http://concurrencykit.org/