CK_HS_RESET(3)
π CK_HS_RESET(3) β the ck_hs_reset glow-up π
okay bestie, so this is a page from the Concurrency Kit manual β that's manual section 3, <pink>CK_HS_RESET</pink> β and it's literally all about yeeting every single key out of a hash set. no cap. let's get into it π§β¨
πΈ LIBRARY πΈ
Concurrency Kit, aka libck. link it with -lck and you're good π«Ά
β¨ SYNOPSIS β¨
#include <ck_hs.h>
bool
ck_hs_reset(ck_hs_t *hs);
π DESCRIPTION π
ck_hs_reset(3) removes all the keys stored in the hash set that hs points at. like, all of them. every last one. it's giving spring cleaning, it's giving factory reset, it's giving "we're starting over and we're not talking about it" π
the hash set you're clearing out is the one pointed to by the hs argument. that's the whole vibe. π
π¦ RETURN VALUES π¦
- if it works out,
ck_hs_reset(3)returnstrueβ - if it doesn't, it returns
falseπ
and here's the tea: the only way this thing fails is if a replacement hash set could not be allocated internally. so if it says false, it's not being dramatic β something genuinely couldn't get allocated. π€
π₯ ERRORS π₯
β οΈ behavior is undefined if hs is uninitialized. do not pass her an uninitialized hash set, bestie, she will not survive it.
β οΈ behavior is undefined if this function is called by a non-writer thread. this is a writer-thread-only situation, periodt. if you're not the writer thread, stay in your lane π
π SEE ALSO π
the whole friend group π«Ά
ck_hs_init(3)ck_hs_move(3)ck_hs_destroy(3)CK_HS_HASH(3)ck_hs_iterator_init(3)ck_hs_next(3)ck_hs_get(3)ck_hs_put(3)ck_hs_put_unique(3)ck_hs_set(3)ck_hs_fas(3)ck_hs_remove(3)ck_hs_reset_size(3)ck_hs_grow(3)ck_hs_gc(3)ck_hs_rebuild(3)ck_hs_count(3)ck_hs_stat(3)
additional information is available at http://concurrencykit.org/ β¨
and that's the whole page, no notes π this one's from the Concurrency Kit source, dated September 17, 2012 β vintage but still slaying, fr fr. mwah, go clear that hash set πππ
π¦ 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