CK_PR_FENCE_ACQUIRE(3)
π CK_PR_FENCE_ACQUIRE β enforce acquire semantics π
okay bestie, so this one lives in the Concurrency Kit, aka libck, and you link it with -lck. she's a tiny function but she is so important, like the quiet girl in class who's actually running everything. π
β¨ SYNOPSIS β¨
#include <ck_pr.h>
void
ck_pr_fence_acquire(void);
πΈ DESCRIPTION πΈ
so like. picture this. you've got loads happening before you call this function, and you've got stores, loads and atomic operations happening after. this function enforces the partial ordering between them. π¦
basically, everything you loaded before invoking ck_pr_fence_acquire() is guaranteed to be ordered with respect to everything that comes after it. no sneaky reordering, no chaotic CPU behaviour, no nonsense. periodt. π
and like, why do you care? because this is typically used to implement critical sections. that's the vibe. that's the whole job. she's the bouncer at the door of your critical section, checking IDs, making sure nobody cuts the line. π
π RETURN VALUES π
this function has no return value. she gives you nothing back. not a 0, not a 1, not a little nod. she just does her thing and leaves. iconic behaviour honestly. π«Ά
π₯ SEE ALSO π₯
the whole friend group, go read them too:
ck_pr_stall(3)ck_pr_fence_atomic(3)ck_pr_fence_atomic_store(3)ck_pr_fence_atomic_load(3)ck_pr_fence_release(3)ck_pr_fence_store(3)ck_pr_fence_memory(3)ck_pr_barrier(3)ck_pr_fas(3)ck_pr_load(3)ck_pr_store(3)ck_pr_faa(3)ck_pr_inc(3)ck_pr_dec(3)ck_pr_neg(3)ck_pr_not(3)ck_pr_add(3)ck_pr_sub(3)ck_pr_and(3)ck_pr_or(3)ck_pr_xor(3)ck_pr_cas(3)ck_pr_btc(3)ck_pr_bts(3)ck_pr_btr(3)
and if you want even more lore, there's additional information available at http://concurrencykit.org/ π
ngl the ck_pr_fence_acquire(3) man page you just read was dated January 2, 2014, from the Concurrency Kit library, and that's the whole page bestie, no cap. go forth and order your memory operations correctly. mwah. ππ
π¦ where this page comes from
- alpine 3.24: ck-doc 0.7.2-r1 Β· BSD-2-Clause AND Apache-2.0
- debian bookworm: libck-dev 0.7.1-10 Β· BSD-2-Clause
- debian trixie: libck-dev 0.7.2-6 Β· BSD-2-Clause
- epel 10: ck-devel 0.7.2-1.el10_1 Β· BSD-2-clause AND Apache-2.0 AND BSD-3-clause
- epel 9: ck-devel 0.7.0-10.el9 Β· BSD
- fedora 43: ck-devel 0.7.2-2.fc43 Β· BSD-2-clause AND Apache-2.0 AND BSD-3-clause
- fedora 43: ck-devel 0.7.2-2.fc43 Β· BSD-2-clause AND Apache-2.0 AND BSD-3-clause
- fedora 44: ck-devel 0.7.2-4.fc44 Β· BSD-2-clause AND Apache-2.0 AND BSD-3-clause
- fedora 44: ck-devel 0.7.2-4.fc44 Β· BSD-2-clause AND Apache-2.0 AND BSD-3-clause
- nixos 26.05: ck 0.7.2
- nixpkgs unstable: ck 0.7.2
- opensuse-leap 16.0: ck-devel 0.7.2-bp160.1.9 Β· Apache-2.0 AND BSD-2-Clause
- opensuse-leap 16.0: ck-devel 0.7.2-bp160.1.9 Β· Apache-2.0 AND BSD-2-Clause
- opensuse-leap 16.0: ck-devel 0.7.2-bp160.1.9 Β· Apache-2.0 AND BSD-2-Clause
- ubuntu jammy: libck-dev 0.7.1-6ubuntu2 Β· BSD-2-Clause
- ubuntu noble: libck-dev 0.7.1-13build1 Β· BSD-2-Clause
- ubuntu questing: libck-dev 0.7.2-5ubuntu1
- ubuntu resolute: libck-dev 0.7.2-5ubuntu2 Β· BSD-2-Clause
- ubuntu stonking: libck-dev 0.7.2-11 Β· BSD-2-Clause
- Copyright 2014 Samy Al Bahra
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms