rt-thread-official/include
Shell 6977cf9101
[src] add rt_hw_cpu_id() wrapper API (#8894)
* [src] add rt_hw_cpu_id() wrapper API

rt_hw_cpu_id() is an unsafe API which should not be used by most codes
directly. It's error-prone because it must be used in proper context,
otherwise it can lead to errors and unpredictable behavior.

This patch adds a wrapper API for rt_hw_cpu_id() to address this risk.
It includes the context-checking functionality and provides a safer
alternative for obtaining CPU IDs, ensuring that it is used correctly
within the appropriate context.

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

* fixup UMP

* update API & comment

* ci: cpp_check

---------

Signed-off-by: Shell <smokewood@qq.com>
2024-05-08 09:22:09 +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 upgrade RT-Thread version to v5.2.0 2024-04-16 23:04:24 -04:00
rthw.h add rt_hw_interrupt_uninstall declare in rthw 2024-04-18 22:08:08 -04: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 [kernel] move std libc related to rtklibc.h 2024-03-20 22:26:11 -04:00
rtservice.h [kernel] fix some strict compiling warnings 2024-02-19 01:56:21 -05:00
rtthread.h [src] add rt_hw_cpu_id() wrapper API (#8894) 2024-05-08 09:22:09 +08:00
rttypes.h [ipc] [dataqueue] 修复队列 pop 挂起的线程 push 无法恢复运行的错误 (#8839) 2024-04-22 20:20:35 +08:00