mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 08:36:24 +08:00
nuttx/sched: use pid to check idle task
Pid is more appropriate than the flink pointer to determine idle task, when we want to use other data structure to optimize the task list.
This commit is contained in:
committed by
Masayuki Ishikawa
parent
b353d84742
commit
18266c1012
@@ -319,7 +319,7 @@ void sched_note_resume(FAR struct tcb_s *tcb)
|
||||
|
||||
if (!up_interrupt_context())
|
||||
{
|
||||
if (tcb->flink == NULL)
|
||||
if (is_idle_task(tcb))
|
||||
{
|
||||
SEGGER_SYSVIEW_OnIdle();
|
||||
}
|
||||
@@ -354,7 +354,7 @@ void sched_note_irqhandler(int irq, FAR void *handler, bool enter)
|
||||
{
|
||||
FAR struct tcb_s *tcb = this_task();
|
||||
|
||||
if (tcb && tcb->flink != NULL)
|
||||
if (tcb && !is_idle_task(tcb))
|
||||
{
|
||||
SEGGER_SYSVIEW_OnTaskStartExec(tcb->pid);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user