1CK_RWCOHORT_INIT(3)      BSD Library Functions Manual      CK_RWCOHORT_INIT(3)
2

NAME

4     CK_RWCOHORT_INIT — initialize instance of a cohort-based reader-writer
5     lock type
6

LIBRARY

8     Concurrency Kit (libck, -lck)
9

SYNOPSIS

11     #include <ck_rwcohort.h>
12
13     CK_RWCOHORT_NEUTRAL_INIT(COHORT_NAME cohort_name, LOCK *lock);
14
15     CK_RWCOHORT_RP_INIT(COHORT_NAME cohort_name, LOCK *lock,
16         unsigned int wait_limit);
17
18     CK_RWCOHORT_WP_INIT(COHORT_NAME cohort_name, LOCK *lock,
19         unsigned int wait_limit);
20

DESCRIPTION

22     This macro initializes the lock instance pointed to by the lock argument.
23     Until a lock instance is initialized using the CK_RWCOHORT_INIT macro,
24     any operations involving it will have undefined behavior.  Note that the
25     wait_limit argument should only be used with reader-preference or writer-
26     preference locks.  For neutral locks, this argument should be excluded.
27     If you are unsure of a value to use for the wait_limit argument, you
28     should use CK_RWCOHORT_STRATEGY_DEFAULT_LOCAL_WAIT_LIMIT.
29

SEE ALSO

31     ck_rwcohort(3), CK_RWCOHORT_PROTOTYPE(3),
32     CK_RWCOHORT_TRYLOCK_PROTOTYPE(3), CK_RWCOHORT_INSTANCE(3),
33     CK_RWCOHORT_INITIALIZER(3), CK_RWCOHORT_LOCK(3), CK_RWCOHORT_UNLOCK(3),
34     CK_RWCOHORT_LOCKED(3), CK_RWCOHORT_TRYLOCK(3),
35
36     Additional information available at http://concurrencykit.org/
37
38                              February 24, 2013.
Impressum