rt-thread/include
ricky 7125e7bebd
include:rtdef.h: comment Refine the annotation of RT_ALIGN and RT_ALIGN_DOWN (#10201)
include :rtdef.h : [ Refine the annotation of RT_ALIGN and RT_ALIGN_DOWN ]

This macro is vulnerable to non-2-byte alignments,
but I assume that the macro definition was designed with an explicit use case of 2-byte alignments in mind.
Therefore, I only modify the comment to remind the user.

Solution:
RT_ALIGN(size, align) ((size) + (align) - 1) / (align) * (align)
RT_ALIGN_DOWN(size, align) (size) / (align) * (align)
Here's what deepseek recommends more.

Signed-off-by: Yucai Liu <1486344514@qq.com>
2025-04-18 17:07:57 +08:00
..
klibc [klibc] add rt_sscanf 2024-11-25 09:49:23 +08:00
rtatomic.h feat: rtatomic: lockless single linked list 2024-11-03 10:08:45 +08:00
rtcompiler.h fix: fixed an issue where rt_typeof was not supported in the MDK toolchain 2025-02-19 20:24:59 -05:00
rtdbg.h kernel: cleanup debug APIs 2024-12-20 17:50:00 -05:00
rtdef.h include:rtdef.h: comment Refine the annotation of RT_ALIGN and RT_ALIGN_DOWN (#10201) 2025-04-18 17:07:57 +08:00
rthw.h feat: kernel/libcpu: fit into ilp32d 2024-09-01 15:12:34 -04:00
rtklibc.h [klibc] add kerrno.h 2024-09-23 21:30:37 +08:00
rtm.h [rtdef] use lower-case to define attributes (#6728) 2022-12-11 13:12:03 -05:00
rtsched.h add RT_THREAD_CTRL_SET_PRIORITY 2025-04-13 15:25:42 +08:00
rtservice.h doxygen: add prefix for groups (#9991) 2025-02-15 12:15:19 +08:00
rtthread.h fix: clear error compilation of signal in qemu-a9 smp mode 2025-02-22 14:17:35 -05:00
rttypes.h rttypes.h中增加了对ARCH_CPU_64BIT宏的判断 2025-03-17 16:45:59 +08:00