Repository navigation
apps: Add spinlock.h include for critical section support - #3375
Merged
Merged
Conversation
xiaoxiang781216
previously approved these changes
Jan 24, 2026
hujun260
force-pushed
the
apache_remove_csection
branch
from
January 25, 2026 01:32
1dc4472 to
32f1379
Compare
xiaoxiang781216
approved these changes
Jan 25, 2026
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]>
hujun260
force-pushed
the
apache_remove_csection
branch
from
January 26, 2026 00:57
32f1379 to
1579331
Compare
xiaoxiang781216
approved these changes
Jan 26, 2026
cederom
approved these changes
Jan 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This pull request adds necessary header includes to NuttX applications to support inlined critical section operations. The changes enable the kernel-side optimization of
enter_critical_sectionby providing access to spinlock definitions in application code paths that require fine-grained synchronization.should merge before apache/nuttx#18135
Changes Made
benchmarks/osperf/osperf.c - Added
#include <nuttx/spinlock.h>to support performance measurement of critical section operations with inlining capability.testing/ostest/wdog.c - Added
#include <nuttx/spinlock.h>to enable watchdog timer tests to access inlined synchronization primitives.Related Issues
This commit is part of the critical section refactoring series in NuttX kernel that consolidates synchronization mechanisms using rspinlock_t foundation.
Impact
Files Modified
Applications Layer:
benchmarks/osperf/osperf.c- Performance benchmark tooltesting/ostest/wdog.c- Watchdog timer testsTesting
Verification Checklist