CK_BITMAP_INIT(3)
β¨ NAME β¨
ck_bitmap_init β bestie, it literally initializes a bitmap π
π LIBRARY
Concurrency Kit (that's libck, and you link it with -lck) π
πΈ SYNOPSIS πΈ
#include <ck_bitmap.h>
void
ck_bitmap_init(ck_bitmap_t *bitmap, unsigned int n_bits, bool set);
π¦ DESCRIPTION π¦
Okay so picture this: you've got a bitmap, right? And it's just sitting there, uninitialized, giving absolutely nothing. Enter ck_bitmap_init(), our main character π. It initializes the bitmap that the bitmap pointer is pointing at.
The argument n_bits is how many bits you want stored in the bitmap. Yes bestie, you get to decide. The argument set is the vibe check for your bits β it decides whether the values of the bits in bitmap get initialized to 1 or to 0. So like, all-on or all-off, your call π
Now here's the part where you gotta pay attention, no cap: it is expected that bitmap points to a contiguous region of memory that contains at least the number of bytes specified by ck_bitmap_size(3). Like, the memory has to actually be there. That's the whole thing. That's the assignment π
π«Ά RETURN VALUES π«Ά
This function has no return value. It returns nothing. Void. Empty. It simply does the thing and leaves β¨
π ERRORS π
β οΈ Okay so listen. The behavior ofck_bitmap_init()is undefined ifbitmapis not a pointer to a region of bytes that's at leastck_bitmap_size(3)long. Undefined. As in, we don't know what happens, and you don't want to find out π Do not do this. Give it the memory it deserves.
π SEE ALSO π
ck_bitmap_base(3)ck_bitmap_size(3)ck_bitmap_set(3)ck_bitmap_reset(3)ck_bitmap_clear(3)ck_bitmap_test(3)ck_bitmap_bits(3)ck_bitmap_buffer(3)
And if you want even more lore, additional information is available at http://concurrencykit.org/ π§
Okay that's the whole page bestie, you ate that π
This was CK_BITMAP_INIT(3), dated April 22, 2012, coming to you from the Concurrency Kit era β go forth and initialize responsibly, mwah πβ¨
π¦ 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