diff options
| author | Shell <[email protected]> | 2024-09-25 10:28:38 +0800 |
|---|---|---|
| committer | Meco Man <[email protected]> | 2024-10-11 00:09:01 -0400 |
| commit | 5796e0d646b9fa97e14065859f308b2f5553cc12 (patch) | |
| tree | 82e41c5496d8aab26da5dcd9b9b134b979122b18 /components/net/netdev | |
| parent | 906d1caea6f82dcb45dc1925842e89b76c01bbfd (diff) | |
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]>
Diffstat (limited to 'components/net/netdev')
0 files changed, 0 insertions, 0 deletions
