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
This commit is contained in:
bernard.xiong
2010-07-13 07:36:37 +00:00
parent 69466590ff
commit 214e44c3f9
6 changed files with 37 additions and 22 deletions

View File

@@ -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