linear_range_get_value(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… linear_range_get_value(9) β€” like, the Kernel API Manual entry, bestie

okay so picture this: it's a Kernel API Manual page, the function is linear_range_get_value, and she is lowkey iconic. she's the one who goes "you gave me a selector? cute. here's the value." fr fr. let's get into it πŸŽ€


✨ NAME ✨

linear_range_get_value β€” fetch a value from given range πŸ’–

🌸 SYNOPSIS 🌸

int linear_range_get_value (const struct linear_range *r , unsigned int
selector , unsigned int *val );

like, three args, one int coming back. no cap, that's the whole vibe. ✨

πŸ¦‹ ARGUMENTS πŸ¦‹

  • r β€” pointer to linear range where value is looked from. like, this is the range she's searching in, bestie. that's the whole assignment. πŸ”
  • selector β€” selector for which the value is searched. you hand her a selector and she goes looking, obsessed. πŸ’…
  • val β€” address where found value is updated. this is where the answer gets dropped off, so make sure it's a real place to write to, mkay? 🫢

πŸ‘‘ DESCRIPTION πŸ‘‘

Search given ranges for value which matches given selector. that's it, that's the mission. she pulls up the ranges, checks them against your selector, and if there's a match β€” slay, we have a value. literally the main character of range lookups. 🌈

πŸ”₯ RETURN πŸ”₯

  • 0 on success πŸŽ‰
  • -EINVAL given selector is not found from any of the ranges πŸ’€ (so like, if she comes back with -EINVAL, your selector ghosted every single range. rip.)
ngl bestie, check that return value. -EINVAL is not a vibe, it means nothing matched.

🧚 SEE ALSO 🧚

Kernel file ./lib/linear_ranges.c, plus the whole friend group:


and that's the page, bestie πŸ“ it lives in ./lib and it's dated October 2026 β€” so like, yeah, mark your calendar, mwah πŸ’œβœ¨ πŸŽ€

πŸ“¦ where this page comes from