Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: arm64: update thread self on sp-switch #9466

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Sep 25, 2024

  1. feat: arm64: update thread self on sp-switch

    This patch improves the atomicity of context switching by ensuring that
    the stack pointer (sp) and thread self updates occur simultaneously.
    This enhancement is crucial for maintaining thread safety and
    preventing potential inconsistencies during context switches.
    
    Changes:
    - Modified `cpuport.h` to use `ARM64_THREAD_REG` for thread self access.
    - Added an `update_tidr` macro in `context_gcc.S` to streamline thread ID
      updates.
    - Adjusted `rt_hw_context_switch_to` and `rt_hw_context_switch` to call
      `update_tidr`, ensuring atomic updates during context switches.
    - Cleaned up `scheduler_mp.c` by removing redundant thread self
      assignments.
    
    Signed-off-by: Shell <[email protected]>
    polarvid committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    de6349c View commit details
    Browse the repository at this point in the history