函数逻辑报告 |
Source Code:kernel\sched\core.c |
Create Date:2022-07-27 10:37:23 |
| Last Modify:2022-05-22 13:40:38 | Copyright©Brick |
| 首页 | 函数Tree |
| 注解内核,赢得工具 | 下载SCCT | English |
函数名称:sched_setaffinity
函数原型:long sched_setaffinity(pid_t pid, const struct cpumask *in_mask)
返回类型:long
参数:
| 类型 | 参数 | 名称 |
|---|---|---|
| pid_t | pid | |
| const struct cpumask * | in_mask |
| 5408 | 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. |
| 5409 | 如果非p则 |
| 5411 | 返回:负ESRCH |
| 5415 | get_task_struct(p) |
| 5420 | 转到:out_put_task |
| 5422 | 如果非分配CPU掩码则 |
| 5424 | 转到:out_put_task |
| 5426 | 如果非分配CPU掩码则 |
| 5428 | 转到:out_free_cpus_allowed |
| 5435 | 转到:out_free_new_mask |
| 5440 | retval等于security_task_setscheduler(p) |
| 5441 | 如果retval则转到:out_free_new_mask |
| 5445 | cpuset_cpus_allowed(p, cpus_allowed) |
| 5465 | again : |
| 5466 | retval等于__set_cpus_allowed_ptr(p, new_mask, true) |
| 5468 | 如果非retval则 |
| 5469 | cpuset_cpus_allowed(p, cpus_allowed) |
| 5480 | out_free_new_mask : |
| 5481 | 释放CPU掩码 |
| 5482 | out_free_cpus_allowed : |
| 5483 | 释放CPU掩码 |
| 5484 | out_put_task : |
| 5485 | put_task_struct(p) |
| 5486 | 返回:retval |
| 名称 | 描述 |
|---|---|
| SYSCALL_DEFINE3 | sys_sched_setaffinity - set the CPU affinity of a process*@pid: pid of the process*@len: length in bytes of the bitmask pointed to by user_mask_ptr*@user_mask_ptr: user-space pointer to the new CPU mask* Return: 0 on success. An error code otherwise. |
| rcutorture_sched_setaffinity | Get rcutorture access to sched_setaffinity(). |
| COMPAT_SYSCALL_DEFINE3 | |
| move_to_next_cpu | |
| start_kthread | start_kthread - Kick off the hardware latency sampling/detector kthread* This starts the kernel thread that will sit and sample the CPU timestamp* counter (TSC or similar) and look for potential hardware latencies. |
| 源代码转换工具 开放的插件接口 | X |
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |