CK_HT_ENTRY_KEY_SET_DIRECT(3)

πŸ’– CK_HT_ENTRY_KEY_SET_DIRECT(3) πŸ’–

okay bestie, so this one is from the Concurrency Kit manual β€” that's libck, and you link it with -lck ✨. It's a lil one, but she's important, so let's get into it πŸŽ€


✨ NAME ✨

ck_ht_entry_key_set_direct β€” bestie's job is literally just initializing the key value inside a hash table entry 🫢


🌸 LIBRARY 🌸

Concurrency Kit (libck, -lck) β€” that's the whole vibe, that's the whole library πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <ck_ht.h>

void
ck_ht_entry_key_set_direct(ck_ht_entry_t *entry, uintptr_t key);

like, look at her. tiny. iconic. two args and no drama 🌈


πŸ’œ DESCRIPTION πŸ’œ

so the ck_ht_entry_key_set_direct() function goes in and initializes the object that entry points at, using the key value you passed in the key argument. that's it, that's the whole thing πŸ’–

this one is typically the move when you're setting up an entry to hand off to ck_ht_get_spmc(3) and ck_ht_remove_spmc(3) operations β€” like, prep the entry, then let the spmc functions do their lil thing ✨

and ngl, you're expected to associate that entry with a hash table that was initialized with CK_HT_MODE_DIRECT β€” CK_HT_MODE_DIRECT, remember that, it's the whole point of the _direct in the name, iykyk πŸ”₯. if you wanna know more about setting that mode up, go read ck_ht_init(3) πŸ’…


⭐ RETURN VALUES ⭐

ck_ht_entry_key_set_direct() has no return value. none. zero. she returns nothing and she's thriving πŸŽ€


🌈 ERRORS 🌈

This function will never fail. no error paths, no sadness, no errno jump scares. she simply works, periodt πŸ‘‘


🫢 SEE ALSO 🫢

the whole friend group, go say hi πŸ’–:

Additional information available at http://concurrencykit.org/ 🌐


okay and that's the whole page, no cap πŸ’… she was written March 30, 2012 and she lives under the name CK_HT_ENTRY_KEY_SET_DIRECT(3) β€” an absolute icon, obsessed with her, bye bestie πŸŽ€πŸ’–βœ¨

πŸ“¦ where this page comes from