linear_range...elector_high(9)
πΈ 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 bestievalβ the value for which the selector is searched π― like, what are we even looking forselectorβ address where the found selector value gets updated βοΈ yes she's an out-param, she writes backfoundβ 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 π
0on success β slay π-EINVALif 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:
- Kernel file
./lib/linear_ranges.c linear_range_values_in_range(9)linear_range_values_in_range_array(9)linear_range_get_max_value(9)linear_range_get_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_array(9)linear_range_get_selector_within(9)
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
- 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