Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\sys.c Create Date:2022-07-28 09:19:08
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:set the priority of a task* - the caller must hold the RCU read lock

Proto:static int set_one_prio(struct task_struct *p, int niceval, int error)

Type:int

Parameter:

TypeParameterName
struct task_struct *p
intniceval
interror
176  If Not Returns true if current's euid is same as p's uid or euid,* or has CAP_SYS_NICE to p's user_ns.* Called with rcu_read_lock, creds are safe Then
177  error = -EPERM
178  Go to out
180  If niceval < ask_nice - return the nice value of a given task.*@p: the task in question.* Return: The nice value [ -20 ... 0 ... 19 ]. && Not can_nice(p, niceval) Then
181  error = -EACCES
182  Go to out
184  no_nice = security_task_setnice(p, niceval)
185  If no_nice Then
186  error = no_nice
187  Go to out
189  If error == -ESRCH Then error = 0
191  set_user_nice(p, niceval)
192  out :
193  Return error
Caller
NameDescribe
SYSCALL_DEFINE3