函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Compare counter against given value.* Return 1 if greater, 0 if equal and -1 if less

函数原型:int __percpu_counter_compare(struct percpu_counter *fbc, s64 rhs, s32 batch)

返回类型:int

参数:

类型参数名称
struct percpu_counter *fbc
s64rhs
s32batch
206  count等于percpu_counter_read(fbc)
208  如果abs - return absolute value of an argument*@x: the value. If it is unsigned type, it is converted to signed type first.* char is treated as if it was signed (regardless of whether it really is)* but the macro's return type is preserved as char.(count - rhs)大于batchnum_online_cpus()则
209  如果count大于rhs则返回:1
211  否则返回:负1
215  count等于percpu_counter_sum(fbc)
216  如果count大于rhs则返回:1
218  否则如果count小于rhs则返回:负1
220  否则返回:0