From aed5dadc3dd1a3f93c5ac540d8c729d72c1e7460 Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Tue, 5 Apr 2022 14:50:23 +0800 Subject: [PATCH] sched/irq: Remove CONFIG_SCHED_IRQMONITOR when define CALL_VECTOR since up_perf_ API doesn't couple with CONFIG_SCHED_IRQMONITOR Signed-off-by: Xiang Xiao --- sched/irq/irq_dispatch.c | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/sched/irq/irq_dispatch.c b/sched/irq/irq_dispatch.c index 2b25e132fe..7a6c8711f6 100644 --- a/sched/irq/irq_dispatch.c +++ b/sched/irq/irq_dispatch.c @@ -70,10 +70,7 @@ # define CONFIG_SCHED_CRITMONITOR_MAXTIME_IRQ 0 #endif -#ifndef CONFIG_SCHED_IRQMONITOR -# define CALL_VECTOR(ndx, vector, irq, context, arg) \ - vector(irq, context, arg) -#elif defined(CONFIG_SCHED_CRITMONITOR) +#ifdef CONFIG_SCHED_IRQMONITOR # define CALL_VECTOR(ndx, vector, irq, context, arg) \ do \ { \ @@ -98,21 +95,7 @@ while (0) #else # define CALL_VECTOR(ndx, vector, irq, context, arg) \ - do \ - { \ - struct timespec start; \ - struct timespec end; \ - struct timespec delta; \ - clock_systime_timespec(&start); \ - vector(irq, context, arg); \ - clock_systime_timespec(&end); \ - clock_timespec_subtract(&end, &start, &delta); \ - if (delta.tv_nsec > g_irqvector[ndx].time) \ - { \ - g_irqvector[ndx].time = delta.tv_nsec; \ - } \ - } \ - while (0) + vector(irq, context, arg) #endif /* CONFIG_SCHED_IRQMONITOR */ /****************************************************************************