函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:atomic64_cmpxchg

函数原型:static inline s64 atomic64_cmpxchg(atomic64_t *v, s64 old, s64 new)

返回类型:s64

参数:

类型参数名称
atomic64_t *v
s64old
s64new
1463  kasan_check_write(v, v的长度)
1464  返回:arch_atomic64_cmpxchg - cmpxchg atomic64 variable*@v: pointer to type atomic64_t*@o: expected value*@n: new value* Atomically sets @v to @n if it was equal to @o and returns* the old value.
调用者
名称描述
pvclock_clocksource_read
__update_gt_cputimeSet cputime to sum_cputime if sum_cputime > cputime. Use cmpxchg* to avoid race conditions with concurrent updates to cputime.
blkcg_scale_delayScale the accumulated delay based on how long it has been since we updated* the delay. We only call this when we are adding delay, in case it's been a* while since we added delay, and when we are checking to see if we need to
atomic64_try_cmpxchg
inode_set_max_iversion_rawde_set_max_iversion_raw - update i_version new value is larger*@inode: inode to set*@val: new i_version to set* Some self-managed filesystems (e.g Ceph) will only update the i_version* value if the new value is larger than the one we already have.