sort_r_nonatomic(9)
π sort_r_nonatomic(9) β Kernel API Manual π¦
okay bestie, welcome to the sort_r_nonatomic(9) page, like the actual kernel API manual, and no I will not be normal about it β¨
π NAME π
sort_r_nonatomic β sort an array of elements, with cond_resched
like literally the whole vibe is "sorting but polite about it" π
πΈ SYNOPSIS πΈ
void sort_r_nonatomic (void *base , size_t num , size_t size ,
cmp_r_func_t cmp_func , swap_r_func_t swap_func , const void *priv );
β¨ ARGUMENTS β¨
baseβ pointer to data to sort. yes queen, this is your array, hand it over π«Άnumβ number of elements. how many lil guys are we sorting, be honest πsizeβ size of each element. every element's own personal size, respect itcmp_funcβ pointer to comparison function. the icon that decides who goes first πswap_funcβ pointer to swap function orNULL. if you don't bring your own swap it's fine,NULLis valid, no pressure πprivβ third argument passed to comparison function. a lil extra something that gets carried along tocmp_func, iykyk π
π DESCRIPTION π
Same as sort_r, but preferred for larger arrays as it does a periodic cond_resched. fr fr, on big boi arrays this one is the main character β it takes little breathers along the way so the rest of the kernel can breathe too π§π
π SEE ALSO π
Kernel file ./lib/sort.c is_aligned(9), swap_words_32(9), swap_words_64(9), swap_bytes(9), parent(9), sort_r(9) β go read the whole friend group, they're all iconic β
and that's the page bestie!! this whole thing lives in ./lib, dated October 2026, and it's literally titled sort_r_nonatomic(9). slay, go sort something πππ¦
π¦ 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