函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:include\linux\atomic-fallback.h Create Date:2022-07-27 06:38:49
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称: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

函数原型:static inline int atomic_fetch_add_unless(atomic_t *v, int a, int u)

返回类型:int

参数:

类型参数名称
atomic_t *v
inta
intu
1086  c等于atomic_read(v)
1088  循环
1089  如果此条件成立可能性小(为编译器优化)(c == u)则退出
1091  当非atomic_try_cmpxchg(v, & c, c + a)循环
1093  返回:c
调用者
名称描述
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