函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:calc_wheel_index

函数原型:static int calc_wheel_index(unsigned long expires, unsigned long clk)

返回类型:int

参数:

类型参数名称
unsigned longexpires
unsigned longclk
499  delta等于expiresclk
502  如果delta小于The time start value for each level to select the bucket at enqueue* time.(1)则
503  idx等于Helper function to calculate the array index for a given expiry* time.
504  否则如果delta小于The time start value for each level to select the bucket at enqueue* time.(2)则
505  idx等于Helper function to calculate the array index for a given expiry* time.
506  否则如果delta小于The time start value for each level to select the bucket at enqueue* time.(3)则
507  idx等于Helper function to calculate the array index for a given expiry* time.
508  否则如果delta小于The time start value for each level to select the bucket at enqueue* time.(4)则
509  idx等于Helper function to calculate the array index for a given expiry* time.
510  否则如果delta小于The time start value for each level to select the bucket at enqueue* time.(5)则
511  idx等于Helper function to calculate the array index for a given expiry* time.
512  否则如果delta小于The time start value for each level to select the bucket at enqueue* time.(6)则
513  idx等于Helper function to calculate the array index for a given expiry* time.
514  否则如果delta小于The time start value for each level to select the bucket at enqueue* time.(7)则
515  idx等于Helper function to calculate the array index for a given expiry* time.
516  否则如果LVL_DEPTH大于8且delta小于The time start value for each level to select the bucket at enqueue* time.(8)则
517  idx等于Helper function to calculate the array index for a given expiry* time.
518  否则如果delta小于0则
519  idx等于clk按位与LVL_MASK
520  否则
525  如果expires大于等于The cutoff (max. capacity of the wheel) expires等于WHEEL_TIMEOUT_MAX
528  idx等于Helper function to calculate the array index for a given expiry* time.
530  返回:idx
调用者
名称描述
__internal_add_timer
__mod_timer