From 214e44c3f9d79e34719cd9cef5e2fc596a693d47 Mon Sep 17 00:00:00 2001 From: "bernard.xiong" Date: Tue, 13 Jul 2010 07:36:37 +0000 Subject: fix down alignment issue; fix the maximal number of rt_scheduler_lock_nest issue; fix rt_tick_from_millisecond issue. git-svn-id: https://rt-thread.googlecode.com/svn/trunk@790 bbd45198-f89e-11dd-88c7-29a3b14d5316 --- include/rtdef.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/rtdef.h b/include/rtdef.h index 01667001b5..f2f1266de0 100644 --- a/include/rtdef.h +++ b/include/rtdef.h @@ -137,9 +137,14 @@ typedef rt_uint32_t rt_off_t; /* Type for offset. */ /** * @def RT_ALIGN(size, align) * Return the most contiguous size aligned at specified width. RT_ALIGN(13, 4) - * would equal to 16. It is needed in some critical contexts. + * would return 16. + * + * @def RT_ALIGN_DOWN(size, align) + * Return the down number of aligned at specified width. RT_ALIGN_DOWN(13, 4) + * would return 12. */ #define RT_ALIGN(size, align) (((size) + (align) - 1) & ~((align)-1)) +#define RT_ALIGN_DOWN(size, align) ((size) & ~((align) -1)) /** * @def RT_NULL -- cgit v1.3.1