函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称: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.

函数原型:SYSCALL_DEFINE4(sched_getattr, pid_t, pid, struct sched_attr __user *, uattr, unsigned int, usize, unsigned int, flags)

返回类型:

参数:

5358  struct sched_attr kattr = {}
5362  如果(!uattr || pid < 0 || usize > PAGE_SIZE || usize < sizeof first published struct || flags)则返回:负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  如果非p则转到:out_unlock
5372  retval等于security_task_getscheduler(p)
5373  如果retval则转到:out_unlock
5376  sched_policy等于任务调度策略
5377  如果 Scheduler bits, serialized by scheduler locks: sched_flags或等于For the sched_{set,get}attr() calls
5379  如果task_has_dl_policy(p)则__getparam_dl(p, & kattr)
5381  否则如果task_has_rt_policy(p)则SCHED_FIFO, SCHED_RR 等于实时任务优先级
5383  否则SCHED_NORMAL, SCHED_BATCH 等于返回给定任务的值
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  返回: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  返回:retval