函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Returns a list organized in an intermediate format suited* to chaining of merge() calls: null-terminated, no reserved or* sentinel head node, "prev" links not maintained.

函数原型:__attribute__((nonnull(2, 3, 4))) static struct list_head *merge(void *priv, cmp_func cmp, struct list_head *a, struct list_head *b)

返回类型:struct list_head

参数:

类型参数名称
void *priv
cmp_funccmp
struct list_head *a
struct list_head *b
22  tail等于head
24  循环
26  如果cmp(priv, a, b)小于等于0则
27  tail等于a
28  tail等于链表后项
29  a等于链表后项
30  如果非a
31  tail等于b
32  退出
34  否则
35  tail等于b
36  tail等于链表后项
37  b等于链表后项
38  如果非b
39  tail等于a
40  退出
44  返回:head
调用者
名称描述
list_sortlist_sort - sort a list*@priv: private data, opaque to list_sort(), passed to @cmp*@head: the list to sort*@cmp: the elements comparison function* The comparison funtion @cmp must return > 0 if @a should sort after*@b ("@a > @b" if you want an ascending