Changeset 25a76ab8 in mainline for boot/generic/include/align.h
- Timestamp:
- 2010-05-08T07:53:23Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 051bc69a
- Parents:
- 6c39a907 (diff), 1317380 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
boot/generic/include/align.h
r6c39a907 r25a76ab8 1 1 /* 2 * Copyright (c) 200 6Jakub Jermar2 * Copyright (c) 2005 Jakub Jermar 3 3 * All rights reserved. 4 4 * … … 27 27 */ 28 28 29 /** @addtogroup generic 30 * @{ 31 */ 32 /** @file 29 /** 30 * @file 31 * @brief Macros for making values and addresses aligned. 33 32 */ 34 33 … … 36 35 #define BOOT_ALIGN_H_ 37 36 37 /** Align to the nearest lower address. 38 * 39 * @param s Address or size to be aligned. 40 * @param a Size of alignment, must be power of 2. 41 */ 42 #define ALIGN_DOWN(s, a) ((s) & ~((a) - 1)) 43 38 44 /** Align to the nearest higher address. 39 45 * 40 * @param addrAddress or size to be aligned.41 * @param a lignSize of alignment, must be power of 2.46 * @param s Address or size to be aligned. 47 * @param a Size of alignment, must be power of 2. 42 48 */ 43 #define ALIGN_UP( addr, align) (((addr) + ((align) - 1)) & ~((align) - 1))49 #define ALIGN_UP(s, a) (((s) + ((a) - 1)) & ~((a) - 1)) 44 50 45 51 #endif
Note:
See TracChangeset
for help on using the changeset viewer.