irq: rename STACK_ALIGNMENT to STACKFRAME_ALIGN for clarity #18045
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 PR improves code clarity by renaming the STACK_ALIGNMENT macro to STACKFRAME_ALIGN throughout the codebase. The new naming better reflects the actual purpose of the macro (frame alignment) while maintaining backward compatibility. Additionally, this PR introduces support for TLS stack alignment with separate STACK_ALIGNMENT and STACKFRAME_ALIGN definitions to support different alignment requirements.
Changes Made
Impact
• Code Quality: Improved macro naming for better code comprehension
• Functionality: Enables independent TLS and frame stack alignment configurations
• Compatibility: Backward compatible with existing STACK_ALIGN_* macros
• Consistency: Uniform naming convention across all supported architectures
• Flexibility: Supports different alignment strategies for TLS vs frame operations
Testing
Test Environment:
• Host: Linux x86_64
• Board: sim, qemu-armv7a (with SMP), and multiple architecture simulators
• Configuration: Multiple board configurations with and without CONFIG_TLS_ALIGNED
Test Procedure:
Test Results:
Tested Architectures:
Stack Alignment Verification:
Verification:
• ✅ All architectures using STACKFRAME_ALIGN correctly
• ✅ TLS alignment support properly implemented
• ✅ Backward compatibility maintained for STACK_ALIGN_* macros
• ✅ Consistent naming convention across codebase
• ✅ Interrupt stack allocation and alignment verified
• ✅ No regressions in stack operations
• ✅ OSTest passed on all tested boards
Related Issues
Improves code clarity and enables flexible stack alignment configuration in NuttX across all supported architectures.