This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git
The following commit(s) were added to refs/heads/master by this push:
new d1de009bc sched: inline enter_critical_section
d1de009bc is described below
commit d1de009bc2744efb155d4a60c6ab4dcf50ffa284
Author: hujun5 <[email protected]>
AuthorDate: Sat Jan 24 18:21:47 2026 +0800
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 <[email protected]>
---
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 0e71a4e05..757fb4216 100644
--- a/benchmarks/osperf/osperf.c
+++ b/benchmarks/osperf/osperf.c
@@ -39,6 +39,7 @@
#include <sys/poll.h>
#include <nuttx/sched.h>
+#include <nuttx/spinlock.h>
/****************************************************************************
* 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 ca692f274..c00a7f9b6 100644
--- a/testing/ostest/wdog.c
+++ b/testing/ostest/wdog.c
@@ -27,6 +27,7 @@
#include <nuttx/config.h>
#include <nuttx/arch.h>
#include <nuttx/wdog.h>
+#include <nuttx/spinlock.h>
#include <assert.h>
#include <pthread.h>