函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:sched_rr_get_interval

函数原型:static int sched_rr_get_interval(pid_t pid, struct timespec64 *t)

返回类型:int

参数:

类型参数名称
pid_tpid
struct timespec64 *t
5870  如果pid小于0则返回:负EINVAL
5873  retval等于负ESRCH
5874  _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
5875  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.
5876  如果非p则转到:out_unlock
5879  retval等于security_task_getscheduler(p)
5880  如果retval则转到:out_unlock
5883  rq等于ask_rq_lock - lock p->pi_lock and lock the rq @p resides on.
5884  time_slice等于0
5885  如果get_rr_intervaltime_slice等于get_rr_interval(rq, p)
5887  task_rq_unlock(rq, p, & rf)
5889  _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()
5890  jiffies_to_timespec64(time_slice, t)
5891  返回:0
5893  out_unlock :
5894  _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()
5895  返回:retval
调用者
名称描述
SYSCALL_DEFINE2sys_sched_rr_get_interval - return the default timeslice of a process.*@pid: pid of the process.*@interval: userspace pointer to the timeslice value.* this syscall writes the default timeslice value of a given process* into the user-space timespec buffer