cpulist_parse(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… cpulist_parse(9) β€” or, how to read a list of CPU ranges like the main character you are

okay so real talk, bestie: this page lives in the Kernel API Manual and it's short, sweet, and honestly kinda iconic. It's the function that takes a string a human typed (full of ranges and commas) and turns it into an actual cpumask. No cap.


✨ NAME ✨

cpulist_parse β€” extract a cpumask from a user string of ranges πŸŽ€


🌸 SYNOPSIS 🌸

int cpulist_parse (const char *buf , struct cpumask *dstp );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • buf β€” the buffer to extract from. this is the string, the raw material, the vibe source, the thing you're reading from 🫢
  • dstp β€” the cpumask to set. this is where the parsed result lands. it's the destination, the glow-up zone, the *dstp of destiny ✨

πŸ”₯ RETURN πŸ”₯

-errno, or 0 for success.

so like β€” zero means you ate and left no crumbs. anything negative means -errno happened and you should probably go read the error and have a little cry about it (affectionately) 😭


πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./include/linux/cpumask.h β€” and literally the entire cpumask cinematic universe, fr fr. buckle up, we're listing all of them because every single one is a baddie in their own right:

yeah. that's the whole friend group. go say hi πŸ‘‹πŸ’œ


lowkey a reminder: this page is short because the function is short. don't go inventing extra behavior for it β€” it parses a user string of ranges into dstp and returns -errno or 0. that's the whole plot. periodt. πŸ’…

mwah, that's the page!! πŸ“ written under ./include/linux, dated October 2026 β€” catch you in the next manpage bestie, ily, go touch some cpumasks πŸ§šβ€β™€οΈπŸ’–

πŸ“¦ where this page comes from