Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\sched\core.c Create Date:2022-07-28 09:36:33
Last Modify:2022-05-22 13:40:38 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:do_sched_setscheduler

Proto:static int do_sched_setscheduler(pid_t pid, int policy, struct sched_param __user *param)

Type:int

Parameter:

TypeParameterName
pid_tpid
intpolicy
struct sched_param __user *param
5105  If Not param || pid < 0 Then Return -EINVAL
5107  If copy_from_user( & lparam, param, sizeof(structsched_param)) Then Return -EFAULT
5110  _read_lock() - mark the beginning of an RCU read-side critical section* When synchronize_rcu() is invoked on one CPU while other CPUs* are within RCU read-side critical sections, then the* synchronize_rcu() is guaranteed to block until after all the other
5111  retval = -ESRCH
5112  p = d_process_by_pid - find a process with a matching PID value.*@pid: the pid in question.* The task of @pid, if found. %NULL otherwise.
5113  If Value is more likely to compile time(p) Then get_task_struct(p)
5115  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
5117  If Value is more likely to compile time(p) Then
5118  retval = sched_setscheduler - change the scheduling policy and/or RT priority of a thread.*@p: the task in question.*@policy: new policy.*@param: structure containing the new RT priority.* Return: 0 on success. An error code otherwise.
5119  put_task_struct(p)
5122  Return retval
Caller
NameDescribe
SYSCALL_DEFINE3sys_sched_setscheduler - set/change the scheduler policy and RT priority*@pid: the pid in question.*@policy: new policy.*@param: structure containing the new RT priority.* Return: 0 on success. An error code otherwise.
SYSCALL_DEFINE2sys_sched_setparam - set/change the RT priority of a thread*@pid: the pid in question.*@param: structure containing the new RT priority.* Return: 0 on success. An error code otherwise.