rt-thread-official/src
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
..
klibc [klibc] add kerrno.h 2024-09-23 21:30:37 +08:00
Kconfig [timer]add all soft timer config (#9048) 2024-06-20 04:20:38 +08:00
SConscript add cpu up 2024-04-19 21:30:12 -04:00
clock.c [src][tick]rt_tick setting arbitrary value function is added to support low-power wake-up tick compensation 2024-07-19 11:51:39 +08:00
components.c [kernel] fix some strict compiling warnings 2024-02-19 01:56:21 -05:00
cpu_mp.c [libcpu/arm64] add C11 atomic ticket spinlock (#8882) 2024-05-16 15:45:12 +08:00
cpu_up.c [arm64] add hw thread self (#8942) 2024-05-28 14:27:55 +08:00
idle.c [smart] add CPU/thread usage tracing config (#8947) 2024-06-04 00:06:41 +08:00
ipc.c [kernel][mutex] fix bug of thread exit without releasing mutex & add error check log 2024-09-11 18:03:43 -04:00
irq.c [kernel] fixup of data racing accessing percpu objects (#8475) 2024-01-09 23:09:49 +08:00
kservice.c feat: kernel/libcpu: fit into ilp32d 2024-09-01 15:12:34 -04:00
mem.c feat: kernel/libcpu: fit into ilp32d 2024-09-01 15:12:34 -04:00
memheap.c feat: kernel/libcpu: fit into ilp32d 2024-09-01 15:12:34 -04:00
mempool.c 🎯 Sync smart & scheduler codes (#8537) 2024-02-23 17:49:15 +08:00
object.c [fix][device] 修正使用rt_device_create创建设备,使用rt_device_destroy删除失败的问题 2024-09-03 18:24:45 -04:00
scheduler_comm.c feat: kernel/libcpu: fit into ilp32d 2024-09-01 15:12:34 -04:00
scheduler_mp.c feat: arm64: update thread self on sp-switch 2024-10-11 00:09:01 -04:00
scheduler_up.c feat: kernel/libcpu: fit into ilp32d 2024-09-01 15:12:34 -04:00
signal.c feat: kernel/libcpu: fit into ilp32d 2024-09-01 15:12:34 -04:00
slab.c feat: kernel/libcpu: fit into ilp32d 2024-09-01 15:12:34 -04:00
thread.c [kernel][mutex] fix bug of thread exit without releasing mutex & add error check log 2024-09-11 18:03:43 -04:00
timer.c [timer]add all soft timer config (#9048) 2024-06-20 04:20:38 +08:00