CK_BITMAP_BUFFER(3)

πŸ’– ck_bitmap_buffer β€” the manual page, bestie edition πŸ’–

okay so real talk, this is the page for ck_bitmap_buffer from the Concurrency Kit manual (that's CK_BITMAP_BUFFER(3) if you're keeping receipts). it's short. it's sweet. it's lowkey iconic. let's get into it 🫢


✨ NAME ✨

ck_bitmap_buffer β€” returns pointer to bit array

like. that's the whole job. it hands you the pointer. slay.


πŸ“š LIBRARY πŸ“š

Concurrency Kit (libck, -lck)

that's the library you're linking against, no cap. add -lck and you're in πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

#include <ck_bitmap.h>

void *
ck_bitmap_buffer(ck_bitmap_t *bitmap);

look at that signature. clean. minimal. main character energy fr fr ✨


πŸ¦‹ DESCRIPTION πŸ¦‹

so the ck_bitmap_buffer() function returns a pointer to the actual bit array. the real one. the raw one. not a copy, not a vibe, the actual array πŸ’€

for ck_bitmap pointers, that bit array is of type CK_BITMAP_WORD[], and it consists of

ck_bitmap_base(bitmap) / sizeof(CK_BITMAP_WORD)

elements. yes that's the exact expression, don't @ me, that's just the math 🌸

and what even is CK_BITMAP_WORD bestie? depends on your platform:

  • On currently supported 64-bit platforms, CK_BITMAP_WORD is uint64_t.
  • On currently supported 32-bit platforms, CK_BITMAP_WORD is uint32_t.

so like, it scales with your architecture, which is honestly so thoughtful of it πŸ‘‘


πŸ”₯ RETURN VALUES πŸ”₯

This function returns a non-NULL value.

that's it. that's the whole return contract. it will never leave you on read πŸ™ˆ no NULL check needed, periodt.

ok but seriously β€” the page says non-NULL, so it's non-NULL. that's the fact and we're keeping it. πŸ’œ

πŸ‘€ SEE ALSO πŸ‘€

the whole friend group, assembled:

Additional information available at http://concurrencykit.org/ β€” go look, it's giving resources 🌈


and that's the page!! written April 22, 2012, filed under CK_BITMAP_BUFFER(3), and yeah it's a 2012 baby but it still ate πŸ’– mwah, go call ck_bitmap_buffer() on something, ily, bye πŸŽ€

πŸ“¦ where this page comes from