CK_RHS_RESET(3)
π CK_RHS_RESET π
okay bestie, so this page lives in section 3 of the manual β CK_RHS_RESET(3) β and it's part of the Concurrency Kit situation. it's literally the "clear the whole thing" button for a hash set. no notes, just vibes. β¨
π LIBRARY
Concurrency Kit β you link it as libck, like this: -lck. that's the whole library section, slay. π
π SYNOPSIS
#include <ck_rhs.h>
bool
ck_rhs_reset(ck_rhs_t *hs);
that's it. one include, one function, one pointer. clean. iconic. β¨
π¦ DESCRIPTION
so ck_rhs_reset(3) removes every single key stored in the hash set that hs points to. like, all of them. every key. gone. the whole set gets a fresh start, main character energy. π§Ήπ
β RETURN VALUES
if everything goes fine, ck_rhs_reset(3) returns true. if it doesn't, it returns false. periodt. π₯
and the only way this function fails is if a replacement hash set couldn't be allocated internally. that's the one and only fail condition, no cap. π
π ERRORS
okay bestie, listen, this is the part where you pay attention, because it's giving undefined behavior and undefined behavior does NOT play nice:
- behavior is undefined if
hsis uninitialized. do not do that. π - behavior is undefined if this function is called by a non-writer thread. this is a writer-thread-only kind of function, iykyk. π
fr fr, "undefined" is not a cute little oopsie. it's the technical way of saying "we make zero promises about what happens next." protect your peace and your threads. π«Ά
πΈ SEE ALSO
the whole girl group, all linked up: ck_rhs_init(3), ck_rhs_move(3), ck_rhs_destroy(3), CK_RHS_HASH(3), ck_rhs_iterator_init(3), ck_rhs_next(3), ck_rhs_get(3), ck_rhs_put(3), ck_rhs_put_unique(3), ck_rhs_set(3), ck_rhs_fas(3), ck_rhs_remove(3), ck_rhs_reset_size(3), ck_rhs_grow(3), ck_rhs_gc(3), ck_rhs_rebuild(3), ck_rhs_count(3), ck_rhs_stat(3)
and if you want even more, there's always http://concurrencykit.org/ π
k bye, that's the page!! this one's from the Concurrency Kit crew, dated September 17, 2012, and it's the CK_RHS_RESET(3) entry. go clear a hash set, bestie, you got this. πβ¨ππ¦
π¦ 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