1CK_COHORT_INSTANCE(3) BSD Library Functions Manual CK_COHORT_INSTANCE(3)
2
4 CK_COHORT_INSTANCE — declare an instance of a cohort type
5
7 Concurrency Kit (libck, -lck)
8
10 #include <ck_cohort.h>
11
12 CK_COHORT_INSTANCE(COHORT_NAME cohort_name);
13
15 The user must use this macro to declare instances of cohort types that
16 they have defined. For instance, if they have used the CK_COHORT_PROTO‐
17 TYPE macro to define a cohort type with name foo, they would create an
18 instance of this type as follows:
19 CK_COHORT_INSTANCE(foo) cohort;
20
21 This macro should also be used when allocating memory for cohorts. For
22 instance, to allocate a block of 4 cohorts:
23 CK_COHORT_INSTANCE(foo) *cohorts = malloc(4 *
24 sizeof(CK_COHORT_INSTANCE(foo)));
25
27 ck_cohort(3), CK_COHORT_PROTOTYPE(3), CK_COHORT_TRYLOCK_PROTOTYPE(3),
28 CK_COHORT_INSTANCE(3), CK_COHORT_INITIALIZER(3), CK_COHORT_LOCK(3),
29 CK_COHORT_UNLOCK(3), CK_COHORT_LOCKED(3), CK_COHORT_TRYLOCK(3),
30
31 Additional information available at http://concurrencykit.org/
32
33 February 24, 2013.