CK_HT_ENTRY_KEY_SET(3)

πŸ’– CK_HT_ENTRY_KEY_SET(3) πŸ’–

okay so bestie, welcome to ck_ht_entry_key_set(3) β€” a manual page from the Concurrency Kit era, and yes we're doing this in the library that lives at libck (link it with -lck, mwah πŸ’…).


✨ NAME ✨

ck_ht_entry_key_set β€” set up a pointer to a key inside a hash table entry, no cap 🫢


πŸ“š LIBRARY πŸ“š

Concurrency Kit (that's libck, and you link it with -lck) 🌸


πŸŽ€ SYNOPSIS πŸŽ€

#include <ck_ht.h>

void
ck_ht_entry_key_set(ck_ht_entry_t *entry, const void *key,
    uint16_t key_length);

πŸ¦‹ DESCRIPTION πŸ¦‹

so like, ck_ht_entry_key_set() takes the object that entry points at and initializes it with a key, and that key is whatever key points at. the length of that key? that's your key_length argument, periodt ✨

the biggest value key_length is allowed to be is defined by the CK_HT_KEY_LENGTH macro. that's the ceiling, bestie, don't go past it πŸ™ˆ

this function is typically used to initialize an entry for ck_ht_get_spmc(3) and ck_ht_remove_spmc(3) operations β€” those are the moments it really shines, main character energy honestly πŸ‘‘

and it's expected that the entry is gonna be associated with a hash table that was initialized with CK_HT_MODE_BYTESTRING. if you want the whole story on that, go peek at ck_ht_init(3) 🧚


πŸ’« RETURN VALUES πŸ’«

ck_ht_entry_key_set() has no return value. it gives you nothing back. it's giving void. and that's iconic of it πŸ’€βœ¨


🌈 ERRORS 🌈

this function will never fail. not once. not ever. it simply cannot and will not do you like that 🫢


πŸ‘‘ SEE ALSO πŸ‘‘

the whole friend group, fr fr:

and if you want even more, there's extra info waiting at http://concurrencykit.org/ πŸ¦‹


okay that's the whole page, you ate that πŸ’… the version is CK_HT_ENTRY_KEY_SET(3) and it's dated March 30, 2012 β€” yeah she's an elder but she's still slaying, and she's from the Concurrency Kit source. bye bestie, go set some keys πŸ’–πŸŒΈβœ¨
πŸ“¦ where this page comes from