CK_COHORT_INSTANCE (3) - Linux Manuals

CK_COHORT_INSTANCE: declare an instance of a cohort type

NAME

CK_COHORT_INSTANCE - declare an instance of a cohort type

LIBRARY

Concurrency Kit (libck, -lck)

SYNOPSIS

In ck_cohort.h Fn CK_COHORT_INSTANCE COHORT_NAME cohort_name

DESCRIPTION

The user must use this macro to declare instances of cohort types that they have defined. For instance, if they have used the CK_COHORT_PROTOTYPE macro to define a cohort type with name foo, they would create an instance of this type as follows:
CK_COHORT_INSTANCE(foo) cohort;

This macro should also be used when allocating memory for cohorts. For instance, to allocate a block of 4 cohorts:
CK_COHORT_INSTANCE(foo) *cohorts = malloc(4 * sizeof(CK_COHORT_INSTANCE(foo)));

SEE ALSO

ck_cohort3, CK_COHORT_PROTOTYPE3, CK_COHORT_TRYLOCK_PROTOTYPE3, CK_COHORT_INSTANCE3, CK_COHORT_INITIALIZER3, CK_COHORT_LOCK3, CK_COHORT_UNLOCK3, CK_COHORT_LOCKED3, CK_COHORT_TRYLOCK3,

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