Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Compare counter against given value.* Return 1 if greater, 0 if equal and -1 if less

Proto:int __percpu_counter_compare(struct percpu_counter *fbc, s64 rhs, s32 batch)

Type:int

Parameter:

TypeParameterName
struct percpu_counter *fbc
s64rhs
s32batch
206  count = percpu_counter_read(fbc)
208  If 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) > batch * num_online_cpus() Then
209  If count > rhs Then Return 1
211  Else Return -1
215  count = percpu_counter_sum(fbc)
216  If count > rhs Then Return 1
218  Else if count < rhs Then Return -1
220  Else Return 0