linear_range...elector_high(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 linear_range_get_selector_high(9) β€” the Kernel API Manual, but make it bestie πŸ’…

okay so picture this: it's the <cyan>Kernel API Manual</cyan>, section 9, and we're talking about linear_range_get_selector_high(9) β€” yes the whole page is literally this function, she's the main character today πŸ‘‘βœ¨


✨ NAME ✨

linear_range_get_selector_high β€” return linear range selector for value 🎯


πŸ¦‹ SYNOPSIS πŸ¦‹

int linear_range_get_selector_high (const struct linear_range *r ,
unsigned int val , unsigned int *selector , bool *found );

like, that's the whole vibe. four params, one int coming back at you πŸ’–


πŸŽ€ ARGUMENTS πŸŽ€

  • r β€” pointer to the linear range where the selector is looked from πŸ” this is our little hunting ground bestie
  • val β€” the value for which the selector is searched 🎯 like, what are we even looking for
  • selector β€” address where the found selector value gets updated ✍️ yes she's an out-param, she writes back
  • found β€” flag to indicate that the given value was in the range 🚩 true = we ate, false = not so much

πŸ’œ DESCRIPTION πŸ’œ

So the way this works: you get back the selector for which the range value is the closest match for the given input value. Closest match meaning… value is matching if it's equal or higher than the given value, periodt ✨

And if the given value is in the range? found gets set to true β€” congrats, she's home πŸ‘πŸ’–

ngl this is the "round up, not down" bestie of the family. if you wanted the low one, that's a different page, iykyk πŸ‘€

🌈 RETURN 🌈

  • 0 on success β€” slay πŸŽ‰
  • -EINVAL if the range is invalid or it does not contain a value greater or equal to the given value 😭 like, the vibes were off, nothing to give you

🫢 SEE ALSO 🫢

the whole friend group fr fr, go say hi:


and that's the page!! πŸ¦‹πŸ’– she lives in ./lib, this version is from October 2026, and the header on the tin still says linear_range...elector_high(9) β€” ok bye bestie, go read your kernel source, mwah πŸ’…πŸŽ€πŸŒŸ

πŸ“¦ where this page comes from