mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-03-27 09:32:28 +08:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user