Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:include\linux\atomic-fallback.h Create Date:2022-07-28 05:34:52
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:atomic_fetch_add_unless - add unless the number is already a given value*@v: pointer of type atomic_t*@a: the amount to add to v...*@u: ...unless v is equal to u.* Atomically adds @a to @v, so long as @v was not already @u.* Returns original value of @v

Proto:static inline int atomic_fetch_add_unless(atomic_t *v, int a, int u)

Type:int

Parameter:

TypeParameterName
atomic_t *v
inta
intu
1086  c = atomic_read(v)
1088  Do
1089  If Value for the false possibility is greater at compile time(c == u) Then Break
1091  When Not atomic_try_cmpxchg(v, & c, c + a) cycle
1093  Return c
Caller
NameDescribe
static_key_slow_try_dec
atomic_add_unlessatomic_add_unless - add unless the number is already a given value*@v: pointer of type atomic_t*@a: the amount to add to v...*@u: ...unless v is equal to u.* Atomically adds @a to @v, if @v was not already @u.* Returns true if the addition was done.
atomic_long_fetch_add_unless