Changeset b87f418 in mainline for generic/include/align.h
- Timestamp:
- 2005-12-07T23:00:30Z (20 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f62355a
- Parents:
- 4acac843
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
generic/include/align.h
r4acac843 rb87f418 30 30 #define __ALIGN_H__ 31 31 32 #define ALIGN(s, a) ((s) % (a) ? (((s) / (a)) + 1) * (a) : (s)) 32 /** Align to the nearest higher address. 33 * 34 * @param s Address or size to be aligned. 35 * @param a Size of alignment. 36 */ 37 #define ALIGN_UP(s, a) ((s) % (a) ? (((s) / (a)) + 1) * (a) : (s)) 38 39 /** Align to the nearest lower address. 40 * 41 * @param s Address or size to be aligned. 42 * @param a Size of alignment. 43 */ 44 #define ALIGN_DOWN(s, a) ((s) & ~((a)-1)) 33 45 34 46 #endif
Note:
See TracChangeset
for help on using the changeset viewer.