drivers/note: Add macro guard for instrumention switch

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
This commit is contained in:
Huang Qi
2022-03-13 22:52:54 +08:00
committed by Xiang Xiao
parent c96c96a399
commit 7d58e6263f
+4
View File
@@ -91,6 +91,7 @@ void sched_note_stop(FAR struct tcb_s *tcb)
#endif
}
#ifdef CONFIG_SCHED_INSTRUMENTATION_SWITCH
void sched_note_suspend(FAR struct tcb_s *tcb)
{
#ifdef CONFIG_SMP
@@ -132,6 +133,7 @@ void sched_note_resume(FAR struct tcb_s *tcb)
#endif
#endif
}
#endif
#ifdef CONFIG_SMP
void sched_note_cpu_start(FAR struct tcb_s *tcb, int cpu)
@@ -156,6 +158,7 @@ void sched_note_cpu_started(FAR struct tcb_s *tcb)
#endif
}
#ifdef CONFIG_SCHED_INSTRUMENTATION_SWITCH
void sched_note_cpu_pause(FAR struct tcb_s *tcb, int cpu)
{
#if CONFIG_TASK_NAME_SIZE > 0
@@ -200,6 +203,7 @@ void sched_note_cpu_resumed(FAR struct tcb_s *tcb)
#endif
}
#endif
#endif
#ifdef CONFIG_SCHED_INSTRUMENTATION_PREEMPTION
/* This does not work well... it interferes with the operation of the