函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:proc_sched_autogroup_set_nice

函数原型:int proc_sched_autogroup_set_nice(struct task_struct *p, int nice)

返回类型:int

参数:

类型参数名称
struct task_struct *p
intnice
210  next等于Have the 32 bit jiffies value wrap 5 minutes after boot* so jiffies wrap bugs show up earlier.
215  如果nice小于MIN_NICEnice大于MAX_NICE则返回:负EINVAL
218  err等于security_task_setnice(当前进程, nice)
219  如果err则返回:err
222  如果nice小于0且非an_nice - check if a task can reduce its nice value*@p: task*@nice: nice value则返回:负EPERM
226  如果非操作权限检查time_before(jiffies, next)则返回:负EAGAIN
229  next等于HZ除10加jiffies
230  ag等于autogroup_task_get(p)
232  idx等于array_index_nospec - sanitize an array index after a bounds check* For a code sequence like:* if (index < size) {* index = array_index_nospec(index, size);* val = array[index];* }* (nice + 20, 40)
233  shares等于scale_load(Nice levels are multiplicative, with a gentle 10% change for every* nice level changed[idx])
235  lock for writing
236  err等于sched_group_set_shares(tg, shares)
237  如果非errnice等于nice
239  lease a write lock
241  autogroup_kref_put(ag)
243  返回:err