Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\time\posix-cpu-timers.c Create Date:2022-07-28 10:47:30
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Set cputime to sum_cputime if sum_cputime > cputime. Use cmpxchg* to avoid race conditions with concurrent updates to cputime.

Proto:static inline void __update_gt_cputime(atomic64_t *cputime, u64 sum_cputime)

Type:void

Parameter:

TypeParameterName
atomic64_t *cputime
u64sum_cputime
250  retry :
251  curr_cputime = atomic64_read(cputime)
252  If sum_cputime > curr_cputime Then
253  If atomic64_cmpxchg(cputime, curr_cputime, sum_cputime) != curr_cputime Then Go to retry
Caller
NameDescribe
update_gt_cputime