CK_EPOCH_REGISTER(3)
π CK_EPOCH_REGISTER β bestie edition π
okay so real talk, this is ck_epoch_register(3) from the Concurrency Kit crew β aka libck, and you link it in with -lck. it's the little function that says "hey epoch system, this thread is HERE and it needs safe memory reclamation, mkay?" π«Ά
β¨ SYNOPSIS β¨
#include <ck_epoch.h>
void
ck_epoch_register(ck_epoch_t *epoch, ck_epoch_record_t *record,
void *cl);
πΈ DESCRIPTION πΈ
so like, ck_epoch_register(3) takes the record object you point at with record and associates it with the epoch object that epoch points to. that's the whole vibe.
here's the part you cannot skip, bestie: any thread or processor that wants safe memory reclamation guarantees has to register a unique record object. unique!! no sharing, no borrowing, no "we'll just reuse my friend's record" β one record per thread/processor, periodt. π
once you've registered, the object that record points to gets its whole lifetime managed by the underlying epoch sub-system. which means:
π¨ do NOT destroy the record object after it's been associated with a ck_epoch_register(3) call. it's not yours anymore in that way. the epoch system is its parent now. π
and ooh, there's a lil bonus β you can pass an optional context pointer cl (as in, whatever you want, it's just a void *), and you can get it back later with the ck_epoch_record_ct(3) function. cute, right? a little pocket for your stuff. π
β RETURN VALUES β
ngl this one's the easiest section in the whole page: this function has no return value. it returns void. nothing. not even an int. slay. πβ¨
π¦ SEE ALSO π¦
the whole friend group, in order:
ck_epoch_init(3)ck_epoch_unregister(3)ck_epoch_recycle(3)ck_epoch_poll(3)ck_epoch_synchronize(3)ck_epoch_reclaim(3)ck_epoch_barrier(3)ck_epoch_call(3)ck_epoch_begin(3)ck_epoch_end(3)
and if you want additional information, it's all chillin' at http://concurrencykit.org/ π
okay that's the whole page!! this one was dated September 2, 2012 and lives under the name CK_EPOCH_REGISTER(3) β so like, shoutout to the original authors, the copyright holders, and whoever wrote the license for this beauty. π registering a record: iconic behavior. go off, bestie. ππ§ββοΈ
π¦ 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 2012-2013 Samy Al Bahra
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms