rt-thread-official/include
Shell f17f994f8c
[arm64] add hw thread self (#8942)
* [libcpu] arm64: Add hardware thread_self support

This patch introduces hardware-based thread self-identification
for the AArch64 architecture. It optimizes thread management by
using hardware registers to store and access the current thread's
pointer, reducing overhead and improving overall performance.

Changes include:
- Added `ARCH_USING_HW_THREAD_SELF` configuration option.
- Modified `rtdef.h`, `rtsched.h` to conditionally include
  `critical_switch_flag` based on the new config.
- Updated context management in `context_gcc.S`, `cpuport.h`
  to support hardware-based thread self.
- Enhanced `scheduler_mp.c` and `thread.c` to leverage the new
  hardware thread self feature.

These modifications ensure better scheduling and thread handling,
particularly in multi-core environments, by minimizing the
software overhead associated with thread management.

Signed-off-by: Shell <smokewood@qq.com>

* fixup: address suggestion

* fixup: rt_current_thread as global

* scheduler: add cpu object for UP scheduler

Also, maintain the rt_current_thread in cpu object on UP scheduler.

---------

Signed-off-by: Shell <smokewood@qq.com>
2024-05-28 14:27:55 +08:00
..
rtatomic.h 🎈 perf: perf rt_hw_interrupt_disable/enable (#8042) 2023-10-25 20:31:25 +08:00
rtcompiler.h Fixed an issue in mdk where macro definitions are not supported in the C99 specification 2024-03-20 22:43:55 +08:00
rtdbg.h [debug] 整理debug宏并增加RT_DEBUGING_CONTEXT (#7805) 2023-07-22 10:36:42 +08:00
rtdef.h [arm64] add hw thread self (#8942) 2024-05-28 14:27:55 +08:00
rthw.h [ipc] support of lockless rt_completion (#8887) 2024-05-08 09:25:57 +08:00
rtklibc.h [klibc] organize and renmae macros, and add CI check 2024-04-20 21:52:49 -04:00
rtm.h [rtdef] use lower-case to define attributes (#6728) 2022-12-11 13:12:03 -05:00
rtsched.h [arm64] add hw thread self (#8942) 2024-05-28 14:27:55 +08:00
rtservice.h [kernel] fix some strict compiling warnings 2024-02-19 01:56:21 -05:00
rtthread.h [arm64] add hw thread self (#8942) 2024-05-28 14:27:55 +08:00
rttypes.h [ipc] [dataqueue] 修复队列 pop 挂起的线程 push 无法恢复运行的错误 (#8839) 2024-04-22 20:20:35 +08:00