rt-thread-official/libcpu
Shell 5796e0d646 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 <smokewood@qq.com>
2024-10-11 00:09:01 -04:00
..
aarch64 feat: arm64: update thread self on sp-switch 2024-10-11 00:09:01 -04:00
arc [libcpu][SConscript]规范group名为libcpu 2024-02-20 08:39:05 +08:00
arm add readme files 2024-08-29 11:58:52 +08:00
avr32 [libcpu][SConscript]规范group名为libcpu 2024-02-20 08:39:05 +08:00
blackfin [libcpu][SConscript]规范group名为libcpu 2024-02-20 08:39:05 +08:00
c-sky [libcpu][SConscript]规范group名为libcpu 2024-02-20 08:39:05 +08:00
ia32 [libcpu][SConscript]规范group名为libcpu 2024-02-20 08:39:05 +08:00
m16c [libcpu][SConscript]规范group名为libcpu 2024-02-20 08:39:05 +08:00
mips [libcpu][SConscript]规范group名为libcpu 2024-02-20 08:39:05 +08:00
nios [libcpu][SConscript]规范group名为libcpu 2024-02-20 08:39:05 +08:00
ppc [libcpu][SConscript]规范group名为libcpu 2024-02-20 08:39:05 +08:00
risc-v [libcpu][risc-v]remove the redundant "0x" from the printed information when cpu is in exception (#9516) 2024-10-09 15:46:39 +08:00
rx [libcpu][SConscript]规范group名为libcpu 2024-02-20 08:39:05 +08:00
sim [libcpu][SConscript]规范group名为libcpu 2024-02-20 08:39:05 +08:00
sparc-v8 [libcpu][SConscript]规范group名为libcpu 2024-02-20 08:39:05 +08:00
ti-dsp [libcpu][SConscript]规范group名为libcpu 2024-02-20 08:39:05 +08:00
unicore32 [libcpu][SConscript]规范group名为libcpu 2024-02-20 08:39:05 +08:00
v850 [libcpu][SConscript]规范group名为libcpu 2024-02-20 08:39:05 +08:00
xilinx [libcpu][SConscript]规范group名为libcpu 2024-02-20 08:39:05 +08:00
Kconfig feat: libcpu/risc-v: unify context on c906, virt64 2024-09-11 18:06:51 -04:00
SConscript [libcpu] Fix the build directory issue 2019-03-26 13:36:01 +00:00