在项目开发中,使用硬汉哥教程中的方法打印线程栈的使用情况:
[C] 纯文本查看 复制代码 App_Printf(" %2d %5d %5d %5d %s\r\n",
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);
在输出的打印结果中会出现 MaxStack < CurStack的情况,如下图,这是怎么回事?
|