CK_ARRAY_BUFFER(3)

πŸ’– ck_array_buffer β€” bestie, it hands you the receipts πŸ“œβœ¨

okay so this is ck_array_buffer(3) from the Concurrency Kit, aka libck (link it with -lck, mwah πŸ’…). It's the little function that goes "hey, here's the array of pointers your readers can currently see, and also here's how long it is." iconic behaviour honestly.


🌸 SYNOPSIS 🌸

#include <ck_array.h>

void *
ck_array_buffer(ck_array_t *array, unsigned int *length);

πŸ¦‹ DESCRIPTION πŸ¦‹

so ck_array_buffer(3) gives you back a pointer to the array of pointers that readers can currently see in array β€” specifically, the state of things after the last commit operation. like, the version that's actually live for the readers, not some half-finished draft bestie πŸ’€

and the unsigned int that length points at? yeah, that gets updated to reflect the length of the array. so you get the pointer AND the count. two for one, we love a multitasker 🫢


✨ RETURN VALUES ✨

it returns a pointer to an array of pointers. that's it, that's the vibe. periodt. πŸ‘‘


πŸŽ€ SEE ALSO πŸŽ€

the whole friend group, obviously:

more lore is available at http://concurrencykit.org/ 🌈


no cap, that's genuinely everything this one does. short queen, zero filler, ate and left no crumbs πŸ’…

later babes β€” this page came from October 18, 2013, and it's hanging out in the CK_ARRAY_BUFFER(3) section of the manual πŸŽ€βœ¨

πŸ“¦ where this page comes from