linear_range..._value_array(9)
π linear_range..._value_array(9) π
okay so welcome to the Kernel API Manual, bestie β this is the page for linear_range_get_value_array, and honestly? it's giving "small function, big main character energy" β¨
πΈ NAME πΈ
linear_range_get_value_array β fetch a value from array of ranges π
like, you hand it a selector and it goes digging through a whole array of linear ranges to find the matching value. no cap. π
β¨ SYNOPSIS β¨
int linear_range_get_value_array (const struct linear_range *r , int
ranges , unsigned int selector , unsigned int *val );
look at her. four params, one int coming back at you. iconic. π
π«Ά ARGUMENTS π«Ά
rβ pointer to array of linear ranges where value is looked from π (yes bestie, it's the array β the whole squad of ranges, not just one)rangesβ amount of ranges in an array π’ (you gotta tell her how many are in the group chat or she's just guessing)selectorβ selector for which the value is searched π― (this is the thing you're matching against)valβ address where found value is updated π¬ (she writes the answer here, so pls give her a real address, not a vibe)
π DESCRIPTION π
Search through an array of ranges for value which matches given selector. π΅οΈββοΈβ¨
that's it, that's the whole gig. she walks the array, checks each range, and if the selector lines up she hands you back the value. simple, clean, slays. π
π₯ RETURN π₯
0on success π β we love a zero, zero means we ate-EINVALgiven selector is not found from any of the ranges π β yeah, if the selector isn't in any of the ranges, that's the error you get. not found =-EINVAL, periodt. π
π¦ SEE ALSO π¦
Kernel file ./lib/linear_ranges.c π β go read the source, iykyk
and her whole friend group, fr fr:
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_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)
ngl that's a lot of siblings but they're all valid πβ
and that's the page!! this one lives over in ./lib and it's dated October 2026 πΈπ¦ so yeah β lib directory legend, October 2026 edition, linear_range..._value_array(9), signing off ππβ¨
π¦ 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