函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\sort.c Create Date:2022-07-27 07:16:16
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:sort_r - sort an array of elements*@base: pointer to data to sort*@num: number of elements*@size: size of each element*@cmp_func: pointer to comparison function*@swap_func: pointer to swap function or NULL*@priv: third argument passed to comparison

函数原型:void sort_r(void *base, size_t num, size_t size, cmp_r_func_t cmp_func, swap_func_t swap_func, const void *priv)

返回类型:void

参数:

类型参数名称
void *base
size_tnum
size_tsize
cmp_r_func_tcmp_func
swap_func_tswap_func
const void *priv
205  n等于numsize, a等于num除2乘size
206  lsbit等于size按位与负size
208  如果非a则返回
211  如果非swap_func
212  如果s_aligned - is this pointer & size okay for word-wide copying?*@base: pointer to data*@size: size of each element*@align: required alignment (typically 4 or 8)* Returns true if elements can be copied using word loads and storesswap_func等于The values are arbitrary as long as they can't be confused with* a pointer, but small integers make for the smallest compare* instructions.
214  否则如果s_aligned - is this pointer & size okay for word-wide copying?*@base: pointer to data*@size: size of each element*@align: required alignment (typically 4 or 8)* Returns true if elements can be copied using word loads and storesswap_func等于SWAP_WORDS_32
216  否则swap_func等于SWAP_BYTES
227  循环
230  如果aa减等于size
232  否则如果n减等于sizeThe function pointer is last to make tail calls most efficient if the* compiler decides not to inline this function.
234  否则退出
249 c等于2乘bsize, d等于csize小于n循环b等于如果do_cmp(base + c, base + d, cmp_func, priv)大于等于0则c否则d
251  如果d恒等于nb等于c
255 b不等于ado_cmp(base + a, base + b, cmp_func, priv)大于等于0循环
256  b等于parent - given the offset of the child, find the offset of the parent
257  c等于b
258 b不等于a循环
调用者
名称描述
sort