cpumap_print_bitmask_to_buf(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… cpumap_print_bitmask_to_buf β€” from the Kernel API Manual, bestie ✨

okay so picture this: you've got a cpumask, right? and you've got a buffer. and you need the mask in the buffer, as hex. that's literally the whole gig. this lil function is the one who does it. 🫢


✨ NAME ✨

cpumap_print_bitmask_to_buf β€” copies the cpumask into the buffer as hex values of cpumask

no cap, that's it. that's the job description. πŸ’–


πŸŽ€ SYNOPSIS πŸŽ€

ssize_t cpumap_print_bitmask_to_buf (char *buf , const struct cpumask
*mask , loff_t off , size_t count );

🌸 ARGUMENTS 🌸

  • buf β€” the buffer to copy into. this is the destination, the vibe, the place where the hex ends up. 🎯
  • mask β€” the cpumask to copy. the main character of this entire operation, honestly. πŸ‘‘
  • off β€” in the string from which we are copying, we copy to buf. like, you're picking up mid-string and dropping it in. πŸ“
  • count β€” the maximum number of bytes to print. the limit. the budget. don't exceed it. πŸ’€

πŸ¦‹ DESCRIPTION πŸ¦‹

The function prints the cpumask into the buffer as hex values of cpumask β€” yep, hex. not a list, not a range, hex. 🧚

Typically used by bin_attribute to export cpumask bitmask ABI. so like, that's its whole little niche and it's thriving in it. it's giving "specialist". ✨


πŸ”₯ RETURN πŸ”₯

the length of how many bytes have been copied, excluding terminating ' '. so you know exactly how much you got. πŸ’… ngl that's genuinely useful of it.


🌈 SEE ALSO 🌈

Kernel file ./include/linux/cpumask.h β€” and like, the entire extended cpumask cinematic universe, fr fr:


okay that's the whole page, you ate that πŸ’…πŸ’–

tiny sign-off from the very bottom of the page: this one lives in ./include/linux, and the page is dated October 2026 β€” cpumap_print_bitmask_to_buf(9), iconic, no notes. πŸŽ€βœ¨
πŸ“¦ where this page comes from