CK_HT_ENTRY_SET(3)
β¨ CK_HT_ENTRY_SET(3) β¨
okay bestie, welcome to the ck_ht_entry_set page π this one lives in the Concurrency Kit (that's libck, and you link it with -lck btw) and it's genuinely one of the more chill functions in the whole hash table friend group. no drama, no return value, no errors. she just does her thing. iconic behavior honestly π
πΈ NAME πΈ
ck_ht_entry_set β initialize a key-value pair
like. that's it. that's the job. she sets an entry. she's the moment. π
π¦ LIBRARY π¦
Concurrency Kit (libck, -lck)
β¨ SYNOPSIS β¨
#include <ck_ht.h>
void
ck_ht_entry_set(ck_ht_entry_t *entry, ck_ht_hash_t h, const void *key,
uint16_t key_length, const void *value);
look at her go. five arguments, zero returns, all vibes. π
π DESCRIPTION π
so here's the tea, bestie π β ck_ht_entry_set() takes the object that entry points at and initializes it. like, fully glows it up. it gets:
- a key, which is whatever
keypoints at π - a value, which is whatever
valuepoints at π - and the length of that key, which you hand over in
key_lengthπ
and about that key_length β the maximum value it can be is defined by the CK_HT_KEY_LENGTH macro. that's the ceiling. respect the ceiling. no cap (well, actually, cap, but like. the macro one) π
now, when do you actually reach for this? the classic move is initializing an entry so you can feed it to ck_ht_set_spmc(3) and ck_ht_put_spmc(3). those are the operations that do stuff with it. ck_ht_entry_set() is the little pre-game ritual β¨
also important: it is expected that this entry will be associated with a hash table that was initialized with CK_HT_MODE_BYTESTRING β peep ck_ht_init(3) if you want the full lore. so like, don't just roll up with any old table, she has a type and her type is bytestring mode π«Ά
β RETURN VALUES β
ck_ht_entry_set() has no return value.
nothing. void. she gives you nothing and somehow that's still serving π
π§ ERRORS π§
This function will never fail.
not "unlikely to fail." not "fails gracefully." never fails. she simply cannot be stopped. main character energy fr fr π₯
π SEE ALSO π
the whole squad, all of them, no one left behind π
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_set_direct(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_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/ π
ok that's the whole page bestie, go forth and initialize your entries responsibly π«Ά
and that's a wrap!! this one's from Concurrency Kit, dated March 30, 2012 β yeah she's an elder but she's still that girl π β¨ no cap.
π¦ 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