函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:cyc2ns_read_begin

函数原型:__always_inline void cyc2ns_read_begin(struct cyc2ns_data *data)

返回类型:void

参数:

类型参数名称
struct cyc2ns_data *data
66  preempt_disable_notrace()
68  循环
69  seq等于Operations with implied preemption/interrupt protection. These* operations can be used without worrying about preemption or interrupt.(sequence)
70  idx等于seq按位与1
72  cyc2ns_offset等于Operations with implied preemption/interrupt protection. These* operations can be used without worrying about preemption or interrupt.(cyc2ns_offset)
73  cyc2ns_mul等于Operations with implied preemption/interrupt protection. These* operations can be used without worrying about preemption or interrupt.(cyc2ns_mul)
74  cyc2ns_shift等于Operations with implied preemption/interrupt protection. These* operations can be used without worrying about preemption or interrupt.(cyc2ns_shift)
76 此条件成立可能性小(为编译器优化)(seq != Operations with implied preemption/interrupt protection. These* operations can be used without worrying about preemption or interrupt.(sequence))循环
调用者
名称描述
cycles_2_nsAccelerators for sched_clock()* convert from cycles(64bits) => nanoseconds (64bits)* basic equation:* ns = cycles / (freq / ns_per_sec)* ns = cycles * (ns_per_sec / freq)* ns = cycles * (10^9 / (cpu_khz * 10^3))* ns = cycles * (10^6 / cpu_khz)