linear_range_get_value(9)
π 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 π₯
0on success π-EINVALgiven 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:
linear_range_values_in_range(9)linear_range_values_in_range_array(9)linear_range_get_max_value(9)linear_range_get_value_array(9)linear_range_get_selector_low(9)linear_range_get_selector_low_array(9)linear_range_get_selector_high(9)linear_range_get_selector_high_array(9)linear_range_get_selector_within(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms