Function report |
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 activity | Download SCCT | Chinese |
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 |
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. |
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 ]. |
5395 | out_unlock : |
5397 | Return retval |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |