Rev 1787 | Rev 2071 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1787 | Rev 1866 | ||
---|---|---|---|
Line 24... | Line 24... | ||
24 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
24 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
27 | */ |
27 | */ |
28 | 28 | ||
29 | /** @addtogroup libc |
29 | /** @addtogroup libc |
30 | * @{ |
30 | * @{ |
31 | */ |
31 | */ |
32 | /** @file |
32 | /** @file |
33 | */ |
33 | */ |
34 | 34 | ||
35 | #ifndef __ALIGN_H__ |
35 | #ifndef LIBC_ALIGN_H_ |
36 | #define __ALIGN_H__ |
36 | #define LIBC_ALIGN_H_ |
37 | 37 | ||
38 | /** Align to the nearest lower address. |
38 | /** Align to the nearest lower address. |
39 | * |
39 | * |
40 | * @param s Address or size to be aligned. |
40 | * @param s Address or size to be aligned. |
41 | * @param a Size of alignment, must be power of 2. |
41 | * @param a Size of alignment, must be power of 2. |
Line 50... | Line 50... | ||
50 | */ |
50 | */ |
51 | #define ALIGN_UP(s, a) ((long)((s) + ((a) - 1)) & ~((long) (a) - 1)) |
51 | #define ALIGN_UP(s, a) ((long)((s) + ((a) - 1)) & ~((long) (a) - 1)) |
52 | 52 | ||
53 | #endif |
53 | #endif |
54 | 54 | ||
55 | - | ||
56 | /** @} |
55 | /** @} |
57 | */ |
56 | */ |
58 | - | ||
59 | - |