函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\debug\kdb\kdb_support.c Create Date:2022-07-27 12:47:43
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:kdb_task_state_char - Return the character that represents the task state.* Inputs:* p struct task for the process* Returns:* One character to represent the task state.

函数原型:char kdb_task_state_char(const struct task_struct *p)

返回类型:char

参数:

类型参数名称
const struct task_struct *p
627  如果非pprobe_kernel_read(): safely attempt to read from a location*@dst: pointer to the buffer that shall take the data*@src: address to read from*@size: size of the data chunk* Safely read from address @src to the buffer at @dst. If a kernel fault则返回:'E'
630  cpu等于kdb_process_cpu(p)
631  state等于如果如果如果如果如果如果如果如果任务状态恒等于0则'R'否则任务状态小于0则'U'否则任务状态按位与深度睡眠态则'D'否则任务状态按位与TASK_STOPPED则'T'否则任务状态按位与TASK_TRACED则'C'否则进程退出时状态按位与EXIT_ZOMBIE则'Z'否则进程退出时状态按位与Used in tsk->exit_state: 则'E'否则任务状态按位与睡眠态则'S'否则'?'
639  如果是空闲任务
642  如果非kdb_task_has_cpu(p)或irq_depth恒等于1则
643  如果cpu不等于cpu number that owns kdb state等于'I'
646  否则如果非内存信息state恒等于'S'则
647  state等于'M'
649  返回:state
调用者
名称描述
kdb_ps1kdb_ps - This function implements the 'ps' command which shows a* list of the active processes.* ps [DRSTCZEUIMA] All processes, optionally filtered by state
kdb_task_statekdb_task_state - Return true if a process has the desired state* given by the mask.* Inputs:* p struct task for the process* mask mask from kdb_task_state_string to select processes* Returns:
kdb_cpu_statuskdb_cpu - This function implements the 'cpu' command.* cpu []* Returns:* KDB_CMD_CPU for success, a kdb diagnostic if error