---
name: "CK_RWCOHORT_PROTOTYPE"
section: "3"
platform: "linux"
package: "libck-dev"
version: "0.7.2-6"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/CK_RWCOHORT_PROTOTYPE"
---

# CK\_RWCOHORT\_PROTOTYPE(3)

define reader-writer cohort-based lock using the specified cohort type

## NAME

**CK\_RWCOHORT\_PROTOTYPE** – define reader-writer cohort-based lock using the specified cohort type

## LIBRARY

Concurrency Kit (libck, -lck)

## SYNOPSIS

**#include \<ck\_rwcohort.h\>**

**CK\_RWCOHORT\_NEUTRAL\_PROTOTYPE**(*COHORT\_NAME cohort\_name*);

**CK\_RWCOHORT\_RP\_PROTOTYPE**(*COHORT\_NAME cohort\_name*);

**CK\_RWCOHORT\_WP\_PROTOTYPE**(*COHORT\_NAME cohort\_name*);

## DESCRIPTION

The ck\_rwcohort.h header file does not define any cohort types.  Instead, the user must use the CK\_RWCOHORT\_PROTOTYPE macro to define any types they want to use. This macro takes a single argument which corresponds to the type of the cohort lock that the reader-writer lock should use.  A cohort type must have already been defined with that name using the [CK\_COHORT\_PROTOTYPE(3)](/CK_COHORT_PROTOTYPE/3.md) or [CK\_COHORT\_TRYLOCK\_PROTOTYPE(3)](/CK_COHORT_TRYLOCK_PROTOTYPE/3.md) macros.

Instances of the defined lock type can be declared as:\
\
     CK\_RWCOHORT\_INSTANCE(cohort\_name) lock;

## SEE ALSO

[ck\_rwcohort(3)](/ck_rwcohort/3.md), [CK\_COHORT\_PROTOTYPE(3)](/CK_COHORT_PROTOTYPE/3.md), [CK\_COHORT\_TRYLOCK\_PROTOTYPE(3)](/CK_COHORT_TRYLOCK_PROTOTYPE/3.md), [CK\_RWCOHORT\_INSTANCE(3)](/CK_RWCOHORT_INSTANCE/3.md), CK\_RWCOHORT\_INITIALIZER(3), [CK\_RWCOHORT\_INIT(3)](/CK_RWCOHORT_INIT/3.md), [CK\_RWCOHORT\_READ\_LOCK(3)](/CK_RWCOHORT_READ_LOCK/3.md), [CK\_RWCOHORT\_READ\_UNLOCK(3)](/CK_RWCOHORT_READ_UNLOCK/3.md), [CK\_RWCOHORT\_WRITE\_LOCK(3)](/CK_RWCOHORT_WRITE_LOCK/3.md), [CK\_RWCOHORT\_WRITE\_UNLOCK(3)](/CK_RWCOHORT_WRITE_UNLOCK/3.md),

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