函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:do_sched_setscheduler

函数原型:static int do_sched_setscheduler(pid_t pid, int policy, struct sched_param __user *param)

返回类型:int

参数:

类型参数名称
pid_tpid
intpolicy
struct sched_param __user *param
5105  如果非parampid小于0则返回:负EINVAL
5107  如果copy_from_user( & lparam, param, sizeof(structsched_param))则返回:负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  如果此条件成立可能性大(为编译器优化)(p)则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  如果此条件成立可能性大(为编译器优化)(p)则
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  返回:retval
调用者
名称描述
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.