From 15793311060f63e58ab03495f062dee0ddb518dc Mon Sep 17 00:00:00 2001 From: hujun5 Date: Sat, 24 Jan 2026 18:21:47 +0800 Subject: [PATCH] sched: inline enter_critical_section Inline enter_critical_section function calls in performance-critical paths to reduce function call overhead while maintaining consistent semantics, improving overall system latency and responsiveness in real-time scenarios. Signed-off-by: hujun5 --- benchmarks/osperf/osperf.c | 3 ++- testing/ostest/wdog.c | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/benchmarks/osperf/osperf.c b/benchmarks/osperf/osperf.c index 0e71a4e0548..757fb421623 100644 --- a/benchmarks/osperf/osperf.c +++ b/benchmarks/osperf/osperf.c @@ -39,6 +39,7 @@ #include #include +#include /**************************************************************************** * Private Types @@ -129,7 +130,7 @@ static size_t performance_gettime(FAR struct performance_time_s *result) } /**************************************************************************** - * Pthread swtich performance + * Pthread switch performance ****************************************************************************/ static FAR void *pthread_switch_task(FAR void *arg) diff --git a/testing/ostest/wdog.c b/testing/ostest/wdog.c index ca692f27453..c00a7f9b6e0 100644 --- a/testing/ostest/wdog.c +++ b/testing/ostest/wdog.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include