函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\process.c Create Date:2022-07-27 08:48:53
Last Modify:2020-03-16 17:03:44 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Called from fs/proc with a reference on @p to find the function* which called into schedule(). This needs to be done carefully* because the task might wake up and we might look at a stack* changing under us.

函数原型:unsigned long get_wchan(struct task_struct *p)

返回类型:unsigned long

参数:

类型参数名称
struct task_struct *p
931  ret等于0
932  count等于0
934  如果p恒等于当前进程任务状态恒等于就绪态则返回:0
937  如果非try_get_task_stack(p)则返回:0
940  start等于task_stack_page(p)
941  如果非start则转到:out
960  top等于startTHREAD_SIZETOP_OF_KERNEL_STACK_PADDING
961  top减等于2乘sizeof(unsignedlong)
962  bottom等于start
964  sp等于READ_ONCE(sp)
965  如果sp小于bottomsp大于top则转到:out
968  fp等于Use READ_ONCE_NOCHECK() instead of READ_ONCE() if you need* to hide memory access from KASAN.(These two fields must be together. They form a stack frame header,* needed by get_frame_pointer().)
969  循环
970  如果fp小于bottomfp大于top则转到:out
972  ip等于Use READ_ONCE_NOCHECK() instead of READ_ONCE() if you need* to hide memory access from KASAN.( * (unsignedlong * )(fp + sizeof(unsignedlong)))
974  ret等于ip
975  转到:out
977  fp等于Use READ_ONCE_NOCHECK() instead of READ_ONCE() if you need* to hide memory access from KASAN.( * (unsignedlong * )fp)
978 count自加小于16且任务状态不等于就绪态循环
980  out :
981  put_task_stack(p)
982  返回:ret
调用者
名称描述
update_stats_enqueue_sleeper