函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:klist_prev - Ante up prev node in list.*@i: Iterator structure.* First grab list lock. Decrement the reference count of the previous* node, if there was one. Grab the prev node, increment its reference* count, drop the lock, and return that prev node.

函数原型:struct klist_node *klist_prev(struct klist_iter *i)

返回类型:struct klist_node

参数:

类型参数名称
struct klist_iter *i
335  (等于put
336  last等于i_cur
340  spin_lock_irqsave( & k_lock, flags)
342  如果last
343  prev等于to_klist_node(链表前项)
344  如果非klist_dec_and_del(last)则put = NULL
346  否则prev等于to_klist_node(链表前项)
349  i_cur = NULL
350 prev不等于to_klist_node( & k_list)循环
353  i_cur等于prev
354  退出
356  prev等于to_klist_node(链表前项)
359  spin_unlock_irqrestore( & k_lock, flags)
361  如果putlastput(last)
363  返回:i_cur