Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:getthread

Proto:static struct task_struct *getthread(struct pt_regs *regs, int tid)

Type:struct task_struct

Parameter:

TypeParameterName
struct pt_regs *regs
inttid
438  If tid == 0 || tid == -1 Then tid = -atomic_read( & The CPU# of the active CPU, or -1 if none:) - 2
440  If tid < -1 && tid > -Places which use this should consider cpumask_var_t. - 2 Then
441  If task Then Return task
443  Else Return dle_task - return the idle task for a given CPU.*@cpu: the processor in question.* Return: The idle task for the CPU @cpu.
446  If tid <= 0 Then
447  printk - print a kernel message*@fmt: format string* This is printk(). It can be called from any context. We want it to work.* We try to grab the console_lock. If we succeed, it's easy - we log the* output and call the console drivers
448  dump_stack()
449  Return NULL
457  Return Must be called under rcu_read_lock().
Caller
NameDescribe
gdb_cmd_queryHandle the 'q' query packets
gdb_cmd_taskHandle the 'H' task query packets
gdb_cmd_threadHandle the 'T' thread query packets