Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:klist_next - Ante up next node in list.*@i: Iterator structure.* First grab list lock. Decrement the reference count of the previous* node, if there was one. Grab the next node, increment its reference* count, drop the lock, and return that next node.

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

Type:struct klist_node

Parameter:

TypeParameterName
struct klist_iter *i
377  ( = put
378  last = i_cur
382  spin_lock_irqsave( & k_lock, flags)
384  If last Then
385  next = to_klist_node(next)
386  If Not klist_dec_and_del(last) Then put = NULL
388  Else next = to_klist_node(next)
391  i_cur = NULL
392  When next != to_klist_node( & k_list) cycle
395  i_cur = next
396  Break
398  next = to_klist_node(next)
401  spin_unlock_irqrestore( & k_lock, flags)
403  If put && last Then put(last)
405  Return i_cur