cpumap_print_list_to_buf(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… cpumap_print_list_to_buf β€” Kernel API Manual ✨

okay bestie, welcome to the Kernel API Manual corner of the universe, where we take a cpumask and squish it into a buffer as a comma-separated list of cpus πŸŽ€ this one is genuinely so useful and I need you to be seated for it πŸ’–


🌸 NAME 🌸

cpumap_print_list_to_buf β€” copies the cpumask into the buffer as comma-separated list of cpus ✨

like, it takes your mask and writes it out all pretty with commas between the cpu numbers. icon behavior honestly πŸ‘‘


πŸ¦‹ SYNOPSIS πŸ¦‹

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

four args, one ssize_t coming back, no cap 🫢


πŸ’œ ARGUMENTS πŸ’œ

  • buf β€” the buffer to copy into πŸ«™ like this is where the text lands, bestie
  • mask β€” the cpumask to copy πŸ‘€ the actual cpu situation we're printing out
  • off β€” in the string from which we are copying, we copy to buf ⭐ that's the offset into the string we're reading from
  • count β€” the maximum number of bytes to print 🚦 the hard cap, do not exceed, periodt

πŸ”₯ DESCRIPTION πŸ”₯

Everything is same with the above cpumap_print_bitmask_to_buf except the print format πŸ’…

that's literally it β€” same everything, different format. the list format instead of the bitmask format. main character energy but make it comma-separated 🌈


⭐ RETURN ⭐

returns the length of how many bytes have been copied, excluding terminating ' ' ✨

so yeah, count what actually got copied, and that terminating ' ' is not included in the number, bestie πŸ™ˆ


🧚 SEE ALSO 🧚

Kernel file ./include/linux/cpumask.h β€” and honestly the whole cpumask friend group showed up, so let's give them their moment πŸ’–


ok that's the whole page, nothing skipped, everything intact, we ate and left no crumbs πŸ“

and that's a wrap bestie!! this little page lives in ./include/linux and it's stamped October 2026 β€” so it's giving very much future-fresh πŸ”₯ go print some cpus, you're gonna slay πŸ’…πŸ’–πŸ¦‹

πŸ“¦ where this page comes from