Function report |
Source Code:kernel\sched\core.c |
Create Date:2022-07-28 09:36:35 |
| Last Modify:2022-05-22 13:40:38 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:Mimics kernel/events/core.c perf_copy_attr().
Proto:static int sched_copy_attr(struct sched_attr __user *uattr, struct sched_attr *attr)
Type:int
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct sched_attr __user * | uattr | |
| struct sched_attr * | attr |
| 5136 | ret = Get a simple variable from user space(size, & size) |
| 5141 | If Not size Then size = sizeof first published struct |
| 5143 | If size < sizeof first published struct || size > PAGE_SIZE Then Go to err_size |
| 5146 | ret = py_struct_from_user: copy a struct from userspace*@dst: Destination address, in kernel space |
| 5147 | If ret Then |
| 5153 | If sched_flags & SCHED_FLAG_UTIL_CLAMP && size < add: util_{min,max} Then Return -EINVAL |
| 5163 | Return 0 |
| 5165 | err_size : |
| 5166 | Write a simple value into user space( size of attr , & size) |
| 5167 | Return -E2BIG |
| Name | Describe |
|---|---|
| SYSCALL_DEFINE3 | sys_sched_setattr - same as above, but with extended sched_attr*@pid: the pid in question.*@uattr: structure containing the extended parameters.*@flags: for future extension. |
| 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 |