Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\klist.c Create Date:2022-07-28 06:16:24
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name: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.

Proto:struct klist_node *klist_prev(struct klist_iter *i)

Type:struct klist_node

Parameter:

TypeParameterName
struct klist_iter *i
335  ( = put
336  last = i_cur
340  spin_lock_irqsave( & k_lock, flags)
342  If last Then
343  prev = to_klist_node(prev)
344  If Not klist_dec_and_del(last) Then put = NULL
346  Else prev = to_klist_node(prev)
349  i_cur = NULL
350  When prev != to_klist_node( & k_list) cycle
353  i_cur = prev
354  Break
356  prev = to_klist_node(prev)
359  spin_unlock_irqrestore( & k_lock, flags)
361  If put && last Then put(last)
363  Return i_cur