|
|
发表于 2026-4-19 13:07:05
|
显示全部楼层
/* 遍历任务控制列表(TCB list),打印所有的任务的优先级和名称 */
while(1)
{
Shell_GoTo( 6, 0);
p_tcb = &AppTaskStartTCB;
while (p_tcb != (TX_THREAD *)0)
{
printf(" %2d %5d %5d %5d %s",
p_tcb->tx_thread_priority,
p_tcb->tx_thread_stack_size,
(int)p_tcb->tx_thread_stack_end - (int)p_tcb->tx_thread_stack_ptr,
(int)p_tcb->tx_thread_stack_end - (int)p_tcb->tx_thread_stack_highest_ptr,
p_tcb->tx_thread_name);
p_tcb = p_tcb->tx_thread_created_next;
if(p_tcb == &AppTaskStartTCB) break;
else printf("\r\n");
}
Shell_GoTo( 17, 26);printf("%.2f%% \r\n", OSCPUUsage);
Shell_GoTo( 18, 26);printf("%.8fs\r\n", (double) _tx_execution_idle_time_total/SystemCoreClock);
Shell_GoTo( 19, 26);printf("%.8fs\r\n", (double) _tx_execution_thread_time_total/SystemCoreClock);
Shell_GoTo( 20, 26);printf("%.8fs\r\n", (double) _tx_execution_isr_time_total/SystemCoreClock);
Shell_GoTo( 21, 26);printf("%.8fs", (double)(_tx_execution_thread_time_total + \
_tx_execution_idle_time_total + \
_tx_execution_isr_time_total)/SystemCoreClock);
} |
|