mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-09-21 02:06:14 +08:00
[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>
This commit is contained in:
@@ -27,6 +27,7 @@ class CPPCheck:
|
||||
[
|
||||
'cppcheck',
|
||||
'-DRT_ASSERT(x)=',
|
||||
'-DRTM_EXPORT(x)=',
|
||||
'-Drt_list_for_each_entry(a,b,c)=a=(void*)b;',
|
||||
'-I include',
|
||||
'-I thread/components/finsh',
|
||||
|
||||
Reference in New Issue
Block a user