Changeset 25a76ab8 in mainline for boot/generic/include/align.h


Ignore:
Timestamp:
2010-05-08T07:53:23Z (14 years ago)
Author:
Jiri Svoboda <jiri@…>
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.
Message:

Merge mainline changes.

File:
1 moved

Legend:

Unmodified
Added
Removed
  • boot/generic/include/align.h

    r6c39a907 r25a76ab8  
    11/*
    2  * Copyright (c) 2006 Jakub Jermar
     2 * Copyright (c) 2005 Jakub Jermar
    33 * All rights reserved.
    44 *
     
    2727 */
    2828
    29 /** @addtogroup generic
    30  * @{
    31  */
    32 /** @file
     29/**
     30 * @file
     31 * @brief Macros for making values and addresses aligned.
    3332 */
    3433
     
    3635#define BOOT_ALIGN_H_
    3736
     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
    3844/** Align to the nearest higher address.
    3945 *
    40  * @param addr Address or size to be aligned.
    41  * @param align Size 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.
    4248 */
    43 #define ALIGN_UP(addr, align) (((addr) + ((align) - 1)) & ~((align) - 1))
     49#define ALIGN_UP(s, a)  (((s) + ((a) - 1)) & ~((a) - 1))
    4450
    4551#endif
Note: See TracChangeset for help on using the changeset viewer.