函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:lockref_put_not_zero - Decrements count unless count <= 1 before decrement*@lockref: pointer to lockref structure* Return: 1 if count updated successfully or 0 if count would become zero

函数原型:int lockref_put_not_zero(struct lockref *lockref)

返回类型:int

参数:

类型参数名称
struct lockref *lockref
95  Note that the "cmpxchg()" reloads the "old" value for the* failure case.(count--;如果count小于等于1则返回0;, 返回1;)
103  加自旋锁
104  retval等于0
105  如果count大于1则
106  count自减
107  retval等于1
109  自旋锁解锁
110  返回:retval