CK_HT_ENTRY_SET_DIRECT(3)
π ck_ht_entry_set_direct β initialize a key-value pair π
okay bestie, welcome to CK_HT_ENTRY_SET_DIRECT(3), the glow-up page where we set up a single entry and make it iconic. no cap, this is one of the little helper functions that makes the whole hash table thing work, and honestly? she's lowkey carrying. π
π LIBRARY
Concurrency Kit β aka libck, link it with -lck and you're in business π
β¨ SYNOPSIS β¨
#include <ck_ht.h>
void
ck_ht_entry_set_direct(ck_ht_entry_t *entry, ck_ht_hash_t h,
uintptr_t key, uintptr_t value);
πΈ DESCRIPTION πΈ
so the way this works: ck_ht_entry_set() (yes, the name in the description is ck_ht_entry_set(), we don't make the rules, we just report them fr fr) will initialize the object that entry points to. and she's getting filled in with three things:
- the hash value you pass in as
h - the key value you pass in as
key - the value you pass in as
value
and then boom π₯ your entry is initialized. main character moment.
This function is typically used to initialize an entry for ck_ht_set_spmc(3) and ck_ht_put_spmc(3) operations. π«Ά
heads up: it is expected that the entry will be associated with a hash table initialized withCK_HT_MODE_DIRECTβ peepck_ht_init(3)for more info. so like, don't go pairing this entry with the wrong mode, that's not the vibe. π
π« RETURN VALUES π«
ck_ht_entry_set_direct() has no return value. she gives you nothing back because she's already given you everything. periodt. β¨
π¦ ERRORS π¦
This function will never fail. literally never. zero drama, zero errors, just pure success energy. she ate and left no crumbs. π
π₯ SEE ALSO π₯
okay here's the whole friend group, go say hi:
ck_ht_stat(3)ck_ht_init(3)ck_ht_destroy(3)ck_ht_hash(3)ck_ht_hash_direct(3)ck_ht_set_spmc(3)ck_ht_put_spmc(3)ck_ht_gc(3)ck_ht_get_spmc(3)ck_ht_grow_spmc(3)ck_ht_remove_spmc(3)ck_ht_count(3)ck_ht_reset_spmc(3)ck_ht_reset_size_spmc(3)ck_ht_entry_empty(3)ck_ht_entry_key(3)ck_ht_entry_key_length(3)ck_ht_entry_value(3)ck_ht_entry_key_set(3)ck_ht_entry_key_set_direct(3)ck_ht_entry_set(3)ck_ht_entry_key_direct(3)ck_ht_entry_value_direct(3)ck_ht_iterator_init(3)ck_ht_next(3)
Additional information available at http://concurrencykit.org/ π
and that's the page bestie!! this one's from the Concurrency Kit, and the date on the original footer is March 30, 2012 β so yeah, she's been serving since 2012 and she's still slaying π mwah, go initialize something cute ππ
π¦ 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