mirror of https://github.com/RT-Thread/rt-thread
![]() 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> |
||
---|---|---|
.. | ||
klibc | ||
rtatomic.h | ||
rtcompiler.h | ||
rtdbg.h | ||
rtdef.h | ||
rthw.h | ||
rtklibc.h | ||
rtm.h | ||
rtsched.h | ||
rtservice.h | ||
rtthread.h | ||
rttypes.h |