Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\debug\kdb\kdb_support.c Create Date:2022-07-28 11:43:20
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name: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.

Proto:char kdb_task_state_char(const struct task_struct *p)

Type:char

Parameter:

TypeParameterName
const struct task_struct *p
627  If Not p || probe_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 Then Return 'E'
630  cpu = kdb_process_cpu(p)
631  state = If If If If If If If If run state == 0 Then 'R' Else run state < 0 Then 'U' Else run state & TASK_UNINTERRUPTIBLE Then 'D' Else run state & TASK_STOPPED Then 'T' Else run state & TASK_TRACED Then 'C' Else exit state & EXIT_ZOMBIE Then 'Z' Else exit state & Used in tsk->exit_state: Then 'E' Else run state & TASK_INTERRUPTIBLE Then 'S' Else '?'
639  If s_idle_task - is the specified task an idle task?*@p: the task in question.* Return: 1 if @p is an idle task. 0 otherwise. Then
642  If Not kdb_task_has_cpu(p) || irq_depth == 1 Then
643  If cpu != cpu number that owns kdb Then state = 'I'
646  Else if Not mm && state == 'S' Then
647  state = 'M'
649  Return state
Caller
NameDescribe
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