You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ac...@apache.org on 2022/04/09 00:02:20 UTC
[incubator-nuttx] 02/05: sched/irq: Remove CONFIG_SCHED_IRQMONITOR when define CALL_VECTOR
This is an automated email from the ASF dual-hosted git repository.
acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit aed5dadc3dd1a3f93c5ac540d8c729d72c1e7460
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Tue Apr 5 14:50:23 2022 +0800
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 <xi...@xiaomi.com>
---
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 */
/****************************************************************************