CK_PR(3)

✨ ck_pr(3) ✨

okay so bestie, welcome to ck_pr β€” the concurrency primitives interface πŸ’… this is the main character of the Concurrency Kit man pages and honestly? iconic. it's the doorway, the vibe check, the "hey here's everything we've got" page. let's get into it 🫢


🌸 LIBRARY 🌸

Concurrency Kit β€” that's libck, and you link it with -lck πŸŽ€ no cap.


πŸ’– SYNOPSIS πŸ’–

#include <ck_pr.h>

that's it. that's the whole vibe. one include and you're in πŸ‘‘


πŸ¦‹ DESCRIPTION πŸ¦‹

so ck_pr.h hands you an interface to volatile atomic instructions, memory barriers and busy-wait facilities β€” all as provided by the underlying processor underneath you πŸ’€ like, your CPU's got the goods, and this header is the group chat where it tells you about them.

here's the part that matters though, fr fr: you figure out whether an atomic operation exists by checking whether the corresponding CK_F_PR macro exists. that's the detection mechanism. that's the whole system. it's giving "if the macro's there, the op's there."

example time because examples slay:

  • wanna know if ck_pr_add_16(3) is available? ✨ check for CK_F_PR_ADD_16. ✨

that's it. that's the pattern. macro present β†’ operation present. macro absent β†’ don't even try it, bestie πŸ™ˆ

this is the parent page, btw. every actual primitive has its own man page (see below) and this one is just the intro, the vibe-setter, the "here's the map" moment πŸ—ΊοΈ

🌈 SEE ALSO 🌈

the whole fam, in order, no one left out πŸ’œ:

and if you want even more lore, additional information is available at http://concurrencykit.org/ 🌐 go read it, it's free, it's giving knowledge 🧚


and that's the page!! πŸŽ€ this one's from the Concurrency Kit, dated April 7, 2013 β€” yeah she's an elder but she still ate and left no crumbs πŸ’… mwah, go write some lock-free code, ily, bye ✨🫢

πŸ“¦ where this page comes from