Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@AhmedIsmail02
Copy link
Member

Description

  • Rename ulStackFrameSize to ulHardwareSavedExceptionFrameSize to reflect the hardware-saved exception frame (8 or 26 words based on FPU/lazy stacking).
  • Add comments explaining standard vs extended frames.
  • Apply across Cortex-M ports.
  • No functional change, improves readability.

Test Steps

Checklist:

  • I have tested my changes. No regression in existing tests.
  • I have modified and/or added unit-tests to cover the code changes in this Pull Request.

Related Issue

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@AhmedIsmail02 AhmedIsmail02 requested a review from a team as a code owner September 3, 2025 09:36
@arrowmaba
Copy link

"ulHardwareSavedExceptionFrameSize" is 33 chars long. MISRA 5:1 dictates that 31 is the max length for identifiers.
Perhaps the name can be shortened.

@AhmedIsmail02
Copy link
Member Author

AhmedIsmail02 commented Sep 4, 2025

Hello @arrowmaba,
Thanks for your comment

MISRA-C doesn’t cap identifier length at 31 characters.
Rule 5.1 requires that identifiers be distinct in their first 31 significant characters (for portability), not that names be ≤31 chars.

"ulHardwareSavedExceptionFrameSize" (33 chars) is therefore not an issue provided no other internal or external identifier matches its first 31 chars.

jasonpcarroll
jasonpcarroll previously approved these changes Sep 4, 2025
Copy link
Member

@jasonpcarroll jasonpcarroll left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine to me. Let me get another reviewer.

@aggarg
Copy link
Member

aggarg commented Sep 5, 2025

Please apply the following 2 patches for a minor suggestion and to fix the header check:

- Rename ulStackFrameSize to ulHardwareSavedExceptionFrameSize to
reflect the hardware-saved exception frame (8 or 26 words based
on FPU/lazy stacking).
- Add comments explaining standard vs extended frames.
- Apply across Cortex-M ports.
- No functional change, improves readability.

Signed-off-by: Ahmed Ismail <[email protected]>
Signed-off-by: Gaurav Aggarwal <[email protected]>
Arm's copyright header regex is modified with the following:

* Accept both single year copyright headers (e.g., "2024")
and year range copyright headers (e.g., "2024-2025").

* Accept both single-line copyright header and also
multi-line header.

* Add the escape backslash to accept only literal dot
not any character.

Signed-off-by: Gaurav Aggarwal <[email protected]>
Signed-off-by: Ahmed Ismail <[email protected]>
@AhmedIsmail02 AhmedIsmail02 force-pushed the rename-hardware-saved-stack-frame-size-variable branch from 751b1fb to 928f56d Compare September 5, 2025 12:56
@sonarqubecloud
Copy link

sonarqubecloud bot commented Sep 5, 2025

@AhmedIsmail02
Copy link
Member Author

@jasonpcarroll Thanks for your review.
@aggarg Thanks for the suggestions!

The 0001-Minor-code-review-suggestion.patch has been applied to the original commit and for the 0002-Fix-header-check.patch it has been also applied with some additional changes mentioned on this commit message.

Please let me know if further changes are required.

@ActoryOu ActoryOu merged commit 44ae6cf into FreeRTOS:main Sep 9, 2025
17 checks passed
moninom1 pushed a commit to moninom1/FreeRTOS-Kernel that referenced this pull request Sep 30, 2025
…S#1314)

This commit updates the xTaskGetIdleTaskHandle unit test as per the idle
task naming logic.

Signed-off-by: Sudeep Mohanty <[email protected]>
Co-authored-by: Gaurav-Aggarwal-AWS <[email protected]>
sauleThsQuin pushed a commit to sauleThsQuin/FreeRTOS-Kernel that referenced this pull request Sep 30, 2025
…reeRTOS#1314)

* cortex-M ports: Clarify hardware-saved exception frame size variable

- Rename ulStackFrameSize to ulHardwareSavedExceptionFrameSize to
reflect the hardware-saved exception frame (8 or 26 words based
on FPU/lazy stacking).
- Add comments explaining standard vs extended frames.
- Apply across Cortex-M ports.
- No functional change, improves readability.

Signed-off-by: Ahmed Ismail <[email protected]>
Signed-off-by: Gaurav Aggarwal <[email protected]>

* kernel-checker-script: Modify Arm copyright header regex

Arm's copyright header regex is modified with the following:

* Accept both single year copyright headers (e.g., "2024")
and year range copyright headers (e.g., "2024-2025").

* Accept both single-line copyright header and also
multi-line header.

* Add the escape backslash to accept only literal dot
not any character.

Signed-off-by: Gaurav Aggarwal <[email protected]>
Signed-off-by: Ahmed Ismail <[email protected]>

---------

Signed-off-by: Ahmed Ismail <[email protected]>
Signed-off-by: Gaurav Aggarwal <[email protected]>
sauleThsQuin pushed a commit to sauleThsQuin/FreeRTOS-Kernel that referenced this pull request Oct 2, 2025
…reeRTOS#1314)

* cortex-M ports: Clarify hardware-saved exception frame size variable

- Rename ulStackFrameSize to ulHardwareSavedExceptionFrameSize to
reflect the hardware-saved exception frame (8 or 26 words based
on FPU/lazy stacking).
- Add comments explaining standard vs extended frames.
- Apply across Cortex-M ports.
- No functional change, improves readability.

Signed-off-by: Ahmed Ismail <[email protected]>
Signed-off-by: Gaurav Aggarwal <[email protected]>

* kernel-checker-script: Modify Arm copyright header regex

Arm's copyright header regex is modified with the following:

* Accept both single year copyright headers (e.g., "2024")
and year range copyright headers (e.g., "2024-2025").

* Accept both single-line copyright header and also
multi-line header.

* Add the escape backslash to accept only literal dot
not any character.

Signed-off-by: Gaurav Aggarwal <[email protected]>
Signed-off-by: Ahmed Ismail <[email protected]>

---------

Signed-off-by: Ahmed Ismail <[email protected]>
Signed-off-by: Gaurav Aggarwal <[email protected]>
sauleThsQuin pushed a commit to sauleThsQuin/FreeRTOS-Kernel that referenced this pull request Oct 3, 2025
…reeRTOS#1314)

* cortex-M ports: Clarify hardware-saved exception frame size variable

- Rename ulStackFrameSize to ulHardwareSavedExceptionFrameSize to
reflect the hardware-saved exception frame (8 or 26 words based
on FPU/lazy stacking).
- Add comments explaining standard vs extended frames.
- Apply across Cortex-M ports.
- No functional change, improves readability.

Signed-off-by: Ahmed Ismail <[email protected]>
Signed-off-by: Gaurav Aggarwal <[email protected]>

* kernel-checker-script: Modify Arm copyright header regex

Arm's copyright header regex is modified with the following:

* Accept both single year copyright headers (e.g., "2024")
and year range copyright headers (e.g., "2024-2025").

* Accept both single-line copyright header and also
multi-line header.

* Add the escape backslash to accept only literal dot
not any character.

Signed-off-by: Gaurav Aggarwal <[email protected]>
Signed-off-by: Ahmed Ismail <[email protected]>

---------

Signed-off-by: Ahmed Ismail <[email protected]>
Signed-off-by: Gaurav Aggarwal <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants