Changeset 71f1cc1 in mainline
 Timestamp:
 20081025T14:58:54Z (16 years ago)
 Branches:
 lfn, master, serial, ticket/834toolchainupdate, topic/msimupgrade, topic/simplifydevexport
 Children:
 8d32152
 Parents:
 c947dda
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

uspace/lib/libc/include/align.h
rc947dda r71f1cc1 36 36 #define LIBC_ALIGN_H_ 37 37 38 /** Align to the nearest lower address .38 /** Align to the nearest lower address which is a power of two. 39 39 * 40 * @param s 41 * @param a 40 * @param s Address or size to be aligned. 41 * @param a Size of alignment, must be power of 2. 42 42 */ 43 43 #define ALIGN_DOWN(s, a) ((s) & ~((a)  1)) 44 44 45 45 46 /** Align to the nearest higher address .46 /** Align to the nearest higher address which is a power of two. 47 47 * 48 * @param s 49 * @param a 48 * @param s Address or size to be aligned. 49 * @param a Size of alignment, must be power of 2. 50 50 */ 51 51 #define ALIGN_UP(s, a) ((long)((s) + ((a)  1)) & ~((long) (a)  1)) 52 53 /** Round up to the nearest higher boundary. 54 * 55 * @param n Number to be aligned. 56 * @param b Boundary, arbitrary unsigned number. 57 */ 58 #define ROUND_UP(n, b) (((n) / (b) + ((n) % (b) != 0)) * (b)) 52 59 53 60 #endif
Note:
See TracChangeset
for help on using the changeset viewer.