函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\time\clocksource.c Create Date:2022-07-27 11:43:51
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:locks_calc_mult_shift - calculate mult/shift factors for scaled math of clocks*@mult: pointer to mult variable*@shift: pointer to shift variable*@from: frequency to convert from*@to: frequency to convert to*@maxsec: guaranteed runtime conversion range in

函数原型:void clocks_calc_mult_shift(unsigned int *mult, unsigned int *shift, unsigned int from, unsigned int to, unsigned int maxsec)

返回类型:void

参数:

类型参数名称
unsigned int *mult
unsigned int *shift
unsigned intfrom
unsigned intto
unsigned intmaxsec
48  sftacc等于32
54  tmp等于maxsecfrom右移32位
55 tmp循环
56  tmp右移等于1位
57  sftacc自减
64 sft大于0循环
65  tmp等于to左移sft
66  tmp加等于from除2
67  do_div() is NOT a C function(tmp, from)
68  如果tmp右移sftacc位恒等于0则退出
71  mult等于tmp
72  shift等于sft
调用者
名称描述
__clocksource_update_freq_scale__clocksource_update_freq_scale - Used update clocksource with new freq*@cs: clocksource to be registered*@scale: Scale factor multiplied against freq to get clocksource hz*@freq: clocksource frequency (cycles per second) divided by scale
sched_clock_register
__set_cyc2ns_scale