函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Combine final list merge with restoration of standard doubly-linked* list structure

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

返回类型:void

参数:

类型参数名称
void *priv
cmp_funccmp
struct list_head *head
struct list_head *a
struct list_head *b
58  tail等于head
59  count等于0
61  循环
63  如果cmp(priv, a, b)小于等于0则
64  链表后项等于a
65  链表前项等于tail
66  tail等于a
67  a等于链表后项
68  如果非a退出
70  否则
71  链表后项等于b
72  链表前项等于tail
73  tail等于b
74  b等于链表后项
75  如果非b
76  b等于a
77  退出
83  链表后项等于b
84  循环
92  如果此条件成立可能性小(为编译器优化)(!++count)则cmp(priv, b, b)
94  链表前项等于tail
95  tail等于b
96  b等于链表后项
97 b循环
100  链表后项等于head
101  链表前项等于tail
调用者
名称描述
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