hujun260 opened a new pull request, #3375:
URL: https://github.com/apache/nuttx-apps/pull/3375

   ### 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_section` by providing access to spinlock 
definitions in application code paths that require fine-grained synchronization.
   
   should merge before https://github.com/apache/nuttx/pull/18135
   ### Changes Made
   
   1. **benchmarks/osperf/osperf.c** - Added `#include <nuttx/spinlock.h>` to 
support performance measurement of critical section operations with inlining 
capability.
   
   2. **testing/ostest/wdog.c** - Added `#include <nuttx/spinlock.h>` to enable 
watchdog timer tests to access inlined synchronization primitives.
   
   ### Impact
   
   - **Compatibility**: Fully backward compatible with existing applications
   - **Performance**: Enables kernel-side inlining optimizations for 
applications using critical sections
   - **Build**: No changes to build system or configuration
   - **API**: No public API changes
   
   ### Files Modified
   
   **Applications Layer:**
   - `benchmarks/osperf/osperf.c` - Performance benchmark tool
   - `testing/ostest/wdog.c` - Watchdog timer tests
   
   ### Testing Procedures
   
   1. **Build Test**: Verify applications build successfully with new includes
   2. **Functionality Test**: Run osperf and ostest to confirm normal operation
   3. **Performance Test**: Verify osperf measurements remain consistent
   4. **Integration Test**: Test with critical section refactoring (NuttX 
kernel changes)
   
   ### Verification Checklist
   
   - [x] Code builds without warnings
   - [x] Includes are necessary and used by kernel optimizations
   - [x] No circular dependencies introduced
   - [x] Existing tests pass
   - [x] Applications run correctly
   - [x] Performance metrics remain stable
   
   ### Related Issues
   
   This commit is part of the critical section refactoring series in NuttX 
kernel that consolidates synchronization mechanisms using rspinlock_t 
foundation.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to