Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:sched_rr_get_interval

Proto:static int sched_rr_get_interval(pid_t pid, struct timespec64 *t)

Type:int

Parameter:

TypeParameterName
pid_tpid
struct timespec64 *t
5870  If pid < 0 Then Return -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  If Not p Then Go to out_unlock
5879  retval = security_task_getscheduler(p)
5880  If retval Then Go to out_unlock
5883  rq = ask_rq_lock - lock p->pi_lock and lock the rq @p resides on.
5884  time_slice = 0
5885  If get_rr_interval Then time_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  Return 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  Return retval
Caller
NameDescribe
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