Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:sys_sched_getattr - similar to sched_getparam, but with sched_attr*@pid: the pid in question.*@uattr: structure containing the extended parameters.*@usize: sizeof(attr) for fwd/bwd comp.*@flags: for future extension.

Proto:SYSCALL_DEFINE4(sched_getattr, pid_t, pid, struct sched_attr __user *, uattr, unsigned int, usize, unsigned int, flags)

Type:

Parameter:Nothing

5358  struct sched_attr kattr = {}
5362  If (!uattr || pid < 0 || usize > PAGE_SIZE || usize < sizeof first published struct || flags) Then Return -EINVAL
5366  _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
5367  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.
5368  retval = -ESRCH
5369  If Not p Then Go to out_unlock
5372  retval = security_task_getscheduler(p)
5373  If retval Then Go to out_unlock
5376  sched_policy = policy
5377  If Scheduler bits, serialized by scheduler locks: Then sched_flags |= For the sched_{set,get}attr() calls
5379  If task_has_dl_policy(p) Then __getparam_dl(p, & kattr)
5381  Else if task_has_rt_policy(p) Then SCHED_FIFO, SCHED_RR = rt_priority
5383  Else SCHED_NORMAL, SCHED_BATCH = ask_nice - return the nice value of a given task.*@p: the task in question.* Return: The nice value [ -20 ... 0 ... 19 ].
5391  _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()
5393  Return Copy the kernel size attribute structure (which might be larger* than what user-space knows about) to user-space.* Note that all cases are valid: user-space buffer can be larger or* smaller than the kernel-space buffer. The usual case is that both
5395  out_unlock :
5396  _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()
5397  Return retval