Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:calc_wheel_index

Proto:static int calc_wheel_index(unsigned long expires, unsigned long clk)

Type:int

Parameter:

TypeParameterName
unsigned longexpires
unsigned longclk
499  delta = expires - clk
502  If delta < The time start value for each level to select the bucket at enqueue* time.(1) Then
503  idx = Helper function to calculate the array index for a given expiry* time.
504  Else if delta < The time start value for each level to select the bucket at enqueue* time.(2) Then
505  idx = Helper function to calculate the array index for a given expiry* time.
506  Else if delta < The time start value for each level to select the bucket at enqueue* time.(3) Then
507  idx = Helper function to calculate the array index for a given expiry* time.
508  Else if delta < The time start value for each level to select the bucket at enqueue* time.(4) Then
509  idx = Helper function to calculate the array index for a given expiry* time.
510  Else if delta < The time start value for each level to select the bucket at enqueue* time.(5) Then
511  idx = Helper function to calculate the array index for a given expiry* time.
512  Else if delta < The time start value for each level to select the bucket at enqueue* time.(6) Then
513  idx = Helper function to calculate the array index for a given expiry* time.
514  Else if delta < The time start value for each level to select the bucket at enqueue* time.(7) Then
515  idx = Helper function to calculate the array index for a given expiry* time.
516  Else if LVL_DEPTH > 8 && delta < The time start value for each level to select the bucket at enqueue* time.(8) Then
517  idx = Helper function to calculate the array index for a given expiry* time.
518  Else if delta < 0 Then
519  idx = clk & LVL_MASK
520  Else
525  If expires >= The cutoff (max. capacity of the wheel) Then expires = WHEEL_TIMEOUT_MAX
528  idx = Helper function to calculate the array index for a given expiry* time.
530  Return idx
Caller
NameDescribe
__internal_add_timer
__mod_timer