函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:wq_clamp_max_active

函数原型:static int wq_clamp_max_active(int max_active, unsigned int flags, const char *name)

返回类型:int

参数:

类型参数名称
intmax_active
unsigned intflags
const char *name
4180  lim等于如果flags按位与WQ_UNBOUNDunbound wq's aren't per-cpu, scale max_active according to #cpus 否则WQ_MAX_ACTIVE
4182  如果max_active小于1或max_active大于lim打印警告信息("workqueue: max_active %d requested for %s is out of range, clamping between %d and %d\n", max_active, name, 1, lim)
4186  返回:clamp_val - return a value clamped to a given range using val's type*@val: current value*@lo: minimum allowable value*@hi: maximum allowable value* This macro does no typechecking and uses temporary variables of whatever* type the input argument @val is(max_active, 1, lim)
调用者
名称描述
alloc_workqueue
workqueue_set_max_activeworkqueue_set_max_active - adjust max_active of a workqueue*@wq: target workqueue*@max_active: new max_active value.* Set max_active of @wq to @max_active.* CONTEXT:* Don't call from IRQ context.