find_closest_descending(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 of a. 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