Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\blk-rq-qos.c Create Date:2022-07-28 17:32:13
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Increment 'v', if 'v' is below 'below'. Returns true if we succeeded,* false if 'v' + 1 would be bigger than 'below'.

Proto:static bool atomic_inc_below(atomic_t *v, unsigned int below)

Type:bool

Parameter:

TypeParameterName
atomic_t *v
unsigned intbelow
11  cur = atomic_read(v)
13  cycle
16  If cur >= below Then Return false
18  old = atomic_cmpxchg(v, cur, cur + 1)
19  If old == cur Then Break
21  cur = old
24  Return true
Caller
NameDescribe
rq_wait_inc_below