函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:__ratelimit - rate limiting*@rs: ratelimit_state data*@func: name of calling function* This enforces a rate limit: not more than @rs->burst callbacks* in every @rs->interval* RETURNS:* 0 means callbacks will be suppressed.* 1 means go ahead and do it.

函数原型:int ___ratelimit(struct ratelimit_state *rs, const char *func)

返回类型:int

参数:

类型参数名称
struct ratelimit_state *rs
const char *func
32  如果非interval则返回:1
41  如果非raw_spin_trylock_irqsave( & protect the state , flags)则返回:0
44  如果非beginbegin等于jiffies
47  如果ime_is_before_jiffies(a) return true if a is before jiffies (begin + interval)则
48  如果missed
49  如果非flags按位与ssue num suppressed message on exit 的值则
56  begin等于jiffies
57  printed等于0
59  如果burstburst大于printed
60  printed自加
61  ret等于1
62  否则
63  missed自加
64  ret等于0
66  raw_spin_unlock_irqrestore( & protect the state , flags)
68  返回:ret
调用者
名称描述
__printk_ratelimit
devkmsg_write