函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\sched\core.c Create Date:2022-07-27 10:36:12
Last Modify:2022-05-22 13:40:38 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Calculate the expected normal priority: i.e. priority* without taking RT-inheritance into account. Might be* boosted by interactivity modifiers. Changes upon fork,* setprio syscalls, and whenever the interactivity* estimator recalculates.

函数原型:static inline int normal_prio(struct task_struct *p)

返回类型:int

参数:

类型参数名称
struct task_struct *p
1358  如果task_has_dl_policy(p)则prio等于SCHED_DEADLINE tasks has negative priorities, reflecting* the fact that any of them has higher prio than RT and* NORMAL/BATCH tasks.减1
1360  否则如果task_has_rt_policy(p)则prio等于MAX_RT_PRIO减1减实时任务优先级
1362  否则prio等于__normal_prio - return the priority that is based on the static prio
1364  返回:prio
调用者
名称描述
effective_prioCalculate the current priority, i.e. the priority* taken into account by the scheduler. This value might* be boosted by RT tasks, or might be boosted by* interactivity modifiers. Will be RT if the task got* RT-boosted
__setscheduler_params
__setschedulerActually do priority change: must hold pi & rq lock.