更新日期: 2022/06/01 来源: https://gitee.com/weharmony/kernel_liteos_a_note
los_percpu.c 文件参考

浏览源代码.

函数

VOID OsAllCpuStatusOutput (VOID)
 

变量

Percpu g_percpu [LOSCFG_KERNEL_CORE_NUM]
 CPU池,池大小由CPU核数决定 更多...
 

函数说明

◆ OsAllCpuStatusOutput()

VOID OsAllCpuStatusOutput ( VOID  )

在文件 los_percpu.c38 行定义.

39{
40 UINT32 i;
41
42 for (i = 0; i < LOSCFG_KERNEL_CORE_NUM; i++) {
43 switch (g_percpu[i].excFlag) {
44 case CPU_RUNNING:
45 PrintExcInfo("cpu%u is running.\n", i);
46 break;
47 case CPU_HALT:
48 PrintExcInfo("cpu%u is halted.\n", i);
49 break;
50 case CPU_EXC:
51 PrintExcInfo("cpu%u is in exc.\n", i);
52 break;
53 default:
54 break;
55 }
56 }
57 PrintExcInfo("The current handling the exception is cpu%u !\n", ArchCurrCpuid());
58}
STATIC INLINE UINT32 ArchCurrCpuid(VOID)
Definition: los_hw_cpu.h:168
Percpu g_percpu[LOSCFG_KERNEL_CORE_NUM]
CPU池,池大小由CPU核数决定
Definition: los_percpu.c:36
@ CPU_HALT
cpu in the halt | CPU处于暂停状态
@ CPU_EXC
cpu in the exc | CPU处于异常状态
@ CPU_RUNNING
cpu is running | CPU正在运行状态
VOID PrintExcInfo(const CHAR *fmt,...)
打印异常信息
Definition: los_printf.c:263
unsigned int UINT32
Definition: los_typedef.h:57
函数调用图:
这是这个函数的调用关系图:

变量说明

◆ g_percpu

Percpu g_percpu[LOSCFG_KERNEL_CORE_NUM]

CPU池,池大小由CPU核数决定

the kernel per-cpu structure | 每个cpu的内核描述符

在文件 los_percpu.c36 行定义.