函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:sh_task_switch - clean up after a task-switch*@prev: the thread we just switched away from

函数原型:static struct rq *finish_task_switch(struct task_struct *prev)__releases(rq->lock)

返回类型:struct rq

参数:

类型参数名称
struct task_struct *prev
3188  rq等于this_rq()
3189  mm等于prev_mm
3203  如果WARN_ONCE(抢占计数值 != 2 * PREEMPT_DISABLE_OFFSET, "corrupted preempt_count: %s/%d/0x%x\n", comm, pid, 抢占计数值)则设置抢占计数
3208  prev_mm = NULL
3221  prev_state等于任务状态
3222  vtime_task_switch(prev)
3223  perf_event_task_sched_in(prev, 当前进程)
3224  finish_task(prev)
3225  finish_lock_switch(rq)
3226  finish_arch_post_lock_switch()
3227  kcov_finish_switch(当前进程)
3229  fire_sched_in_preempt_notifiers(当前进程)
3242  如果mm
3243  membarrier_mm_sync_core_before_usermode(mm)
3244  mmdrop(mm)
3246  如果此条件成立可能性小(为编译器优化)(prev_state == TASK_DEAD)则
3247  如果task_deadtask_dead(prev)
3254  kprobe_flush_task(prev)
3257  put_task_stack(prev)
3259  put_task_struct_rcu_user(prev)
3262  tick_nohz_task_switch()
3263  返回:rq
调用者
名称描述
schedule_tailschedule_tail - first thing a freshly forked thread must call.*@prev: the thread we just switched away from.
context_switch进程切换