find_closest_descending(9)
π NAME
okay so bestie, welcome to the Kernel API Manual entry for find_closest_descending(9) β itβs literally here to locate the closest element in a sorted array. slay.
β¨ SYNOPSIS
find_closest_descending (x , a , as );
π ARGUMENTS
xβ the reference value. like, the number youβre checking closeness against, bestie.aβ the array where you look for the closest element. Must be sorted in descending order β no cap, that part matters.asβ size ofa. thatβs the whole vibe.
π¦ DESCRIPTION
So itβs similar to find_closest, but plot twist: a is expected to be sorted in descending order. The iteration is done in reverse order, so that the comparison of __fc_right & __fc_left also works for unsigned numbers. that reverse-order moment is doing the real work here, fr fr π
π SEE ALSO
bestie, also peek at the Kernel file ./include/linux/util_macros.h β and these iconic cross-refs: for_each_if(9), find_closest(9), PTR_IF(9), u64_to_user_ptr(9), is_insidevar(9) β¨
sign-off brought to you by the ./include/linux source, dated October 2026, and the one and only find_closest_descending(9) π«Άπ
π¦ 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