Changeset 772d929 in rtems-libbsd


Ignore:
Timestamp:
Apr 4, 2012, 10:47:18 PM (7 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.11, fd86c091b97759106da7355ce1dd81ebe030e285, freebsd-9.3, f020f08430150c1656a0ad0a1de13699db9b980b
Children:
c4f90c7
Parents:
dc4c490
Message:

Add _ALIGN macro based on one in libmisc/shell/fts.c

File:
1 edited

Legend:

Unmodified
Added
Removed
  • freebsd/sys/param.h

    rdc4c490 r772d929  
    157157
    158158/*
     159 * Round p (pointer or byte index) up to a correctly-aligned value
     160 * for all data types (int, long, ...).   The result is u_long and
     161 * must be cast to any desired pointer type.
     162 */
     163#ifndef _ALIGNBYTES
     164#define _ALIGNBYTES     (sizeof(long) - 1)
     165#endif
     166#ifndef _ALIGN
     167#define _ALIGN(p)       (((uintptr_t)(p) + _ALIGNBYTES) &~ _ALIGNBYTES)
     168#endif
     169
     170/*
    159171 * Some macros for units conversion
    160172 */
Note: See TracChangeset for help on using the changeset viewer.