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

# CK\_COHORT\_LOCK(3)

acquire cohort lock

## NAME

**CK\_COHORT\_LOCK** – acquire cohort lock

## LIBRARY

Concurrency Kit (libck, -lck)

## SYNOPSIS

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

**CK\_COHORT\_LOCK**(*COHORT\_NAME cohort\_name*, *COHORT \*cohort*, *void \*global\_context*, *void \*local\_context*);

## DESCRIPTION

This call attempts to acquire both the local and global (if necessary) locks from *cohort*. The call will block until both locks have been acquired. *global\_context* will be passed as the second argument to the function that was provided as the *global\_lock\_method* argument to CK\_COHORT\_PROTOTYPE if that method is called, and *local\_context* will be passed to the function specified by *local\_lock\_method*

## SEE ALSO

[ck\_cohort(3)](/ck_cohort/3.md), [CK\_COHORT\_PROTOTYPE(3)](/CK_COHORT_PROTOTYPE/3.md), [CK\_COHORT\_TRYLOCK\_PROTOTYPE(3)](/CK_COHORT_TRYLOCK_PROTOTYPE/3.md), [CK\_COHORT\_INSTANCE(3)](/CK_COHORT_INSTANCE/3.md), CK\_COHORT\_INITIALIZER(3), [CK\_COHORT\_INIT(3)](/CK_COHORT_INIT/3.md), [CK\_COHORT\_UNLOCK(3)](/CK_COHORT_UNLOCK/3.md), CK\_COHORT\_LOCKED(3), [CK\_COHORT\_TRYLOCK(3)](/CK_COHORT_TRYLOCK/3.md),

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