Changeset View
Changeset View
Standalone View
Standalone View
sys/arm64/include/_align.h
Show All 24 Lines | |||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||||
* SUCH DAMAGE. | * SUCH DAMAGE. | ||||
* | * | ||||
* from: @(#)param.h 5.8 (Berkeley) 6/28/91 | * from: @(#)param.h 5.8 (Berkeley) 6/28/91 | ||||
* $FreeBSD$ | * $FreeBSD$ | ||||
*/ | */ | ||||
#ifdef __arm__ | |||||
#include <arm/_align.h> | |||||
#else /* !__arm__ */ | |||||
#ifndef _MACHINE__ALIGN_H_ | #ifndef _MACHINE__ALIGN_H_ | ||||
#define _MACHINE__ALIGN_H_ | #define _MACHINE__ALIGN_H_ | ||||
/* | /* | ||||
* Round p (pointer or byte index) up to a correctly-aligned value | * Round p (pointer or byte index) up to a correctly-aligned value | ||||
* for all data types (int, long, ...). The result is unsigned int | * for all data types (int, long, ...). The result is unsigned int | ||||
* and must be cast to any desired pointer type. | * and must be cast to any desired pointer type. | ||||
*/ | */ | ||||
#define _ALIGNBYTES (sizeof(long long) - 1) | #define _ALIGNBYTES (sizeof(long long) - 1) | ||||
#define _ALIGN(p) (((u_long)(p) + _ALIGNBYTES) & ~_ALIGNBYTES) | #define _ALIGN(p) (((u_long)(p) + _ALIGNBYTES) & ~_ALIGNBYTES) | ||||
#endif /* !_MACHINE__ALIGN_H_ */ | #endif /* !_MACHINE__ALIGN_H_ */ | ||||
#endif /* !__arm__ */ |