linear_rang...selector_low(9)
π linear_range_get_selector_low(9)
okay so bestie, welcome to the Kernel API Manual β¨ we're doing kernel math today and honestly? it's giving glow-up. this one lives in the linear ranges universe and it's lowkey iconic π
β¨ NAME β¨
linear_range_get_selector_low β return linear range selector for value π¦
like, you hand it a value, it hands you back a selector. match made in heaven fr fr π
πΈ SYNOPSIS πΈ
int linear_range_get_selector_low (const struct linear_range *r ,
unsigned int val , unsigned int *selector , bool *found );
no cap, that's the whole vibe π
π ARGUMENTS π
rβ pointer to linear range where selector is looked from. this is the range we're snooping through πvalβ value for which the selector is searched. the main character of this whole operation βselectorβ address where found selector value is updated. we write the answer here, so she better be ready πfoundβ flag to indicate that given value was in the range. basically a little bool that goes "yup, we ate" π
π¦ DESCRIPTION π¦
Return selector for which range value is closest match for given input value. π«Ά
Value is matching if it is equal or smaller than given value. so like, the range value has to be <= your input β not bigger, bestie, that's the whole rule π
If given value is in the range, then found is set true. π so you always know whether the match was real or we were just reaching π
π₯ RETURN π₯
0on success π-EINVALif range is invalid or does not contain value smaller or equal to given value π
β οΈ heads up:-EINVALisn't just "oops bad range" β it also fires when there's literally no value in the range that's smaller than or equal to what you asked for. check thatfoundflag, iykyk π
β 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(9)linear_range_get_value_array(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!! πΈ brought to you straight outta ./lib π§, dated October 2026 β screenshot it, annotate it, put it on your fridge, periodt π
πβ¨
π¦ 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