函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\pvclock.c Create Date:2022-07-27 09:45:06
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:pvclock_clocksource_read

函数原型:u64 pvclock_clocksource_read(struct pvclock_vcpu_time_info *src)

返回类型:u64

参数:

类型参数名称
struct pvclock_vcpu_time_info *src
74  循环
75  version等于pvclock_read_begin(src)
76  ret等于__pvclock_read_cycles(src, dtsc_ordered() - read the current TSC in program order* rdtsc_ordered() returns the result of RDTSC as a 64-bit integer.* It is ordered like a load to a global in-memory counter. It should* be impossible to observe non-monotonic rdtsc_unordered() behavior)
77  flags等于flags
78 pvclock_read_retry(src, version)循环
80  如果此条件成立可能性小(为编译器优化)((flags & PVCLOCK_GUEST_STOPPED) != 0)则
81  flags与等于PVCLOCK_GUEST_STOPPED的反
82  pvclock_touch_watchdogs()
85  如果valid_flags按位与PVCLOCK_TSC_STABLE_BITflags按位与PVCLOCK_TSC_STABLE_BIT则返回:ret
103  last等于atomic64_read( & last_value)
104  循环
105  如果ret小于last则返回:last
107  last等于atomic64_cmpxchg( & last_value, last, ret)
108 此条件成立可能性小(为编译器优化)(last != ret)循环
110  返回:ret
调用者
名称描述
pvclock_read_wallclock
kvm_clock_read