1196994Sphk/*	$OpenBSD: param.h,v 1.11 1998/08/30 22:05:35 millert Exp $ */
2196994Sphk
3196994Sphk/*-
4196994Sphk * Copyright (c) 1988 University of Utah.
5196994Sphk * Copyright (c) 1992, 1993
6196994Sphk *	The Regents of the University of California.  All rights reserved.
7196994Sphk *
8196994Sphk * This code is derived from software contributed to Berkeley by
9196994Sphk * the Systems Programming Group of the University of Utah Computer
10196994Sphk * Science Department and Ralph Campbell.
11196994Sphk *
12196994Sphk * Redistribution and use in source and binary forms, with or without
13196994Sphk * modification, are permitted provided that the following conditions
14196994Sphk * are met:
15196994Sphk * 1. Redistributions of source code must retain the above copyright
16196994Sphk *    notice, this list of conditions and the following disclaimer.
17196994Sphk * 2. Redistributions in binary form must reproduce the above copyright
18196994Sphk *    notice, this list of conditions and the following disclaimer in the
19196994Sphk *    documentation and/or other materials provided with the distribution.
20196994Sphk * 4. Neither the name of the University nor the names of its contributors
21196994Sphk *    may be used to endorse or promote products derived from this software
22196994Sphk *    without specific prior written permission.
23196994Sphk *
24196994Sphk * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
25196994Sphk * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26196994Sphk * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27196994Sphk * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
28196994Sphk * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29196994Sphk * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30196994Sphk * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31196994Sphk * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32196994Sphk * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33196994Sphk * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34196994Sphk * SUCH DAMAGE.
35196994Sphk *
36196994Sphk *	from: Utah Hdr: machparam.h 1.11 89/08/14
37196994Sphk *	from: @(#)param.h	8.1 (Berkeley) 6/10/93
38196994Sphk *	JNPR: param.h,v 1.6.2.1 2007/09/10 07:49:36 girish
39196994Sphk * $FreeBSD$
40196994Sphk */
41196994Sphk
42196994Sphk#ifndef _MIPS_INCLUDE__ALIGN_H_
43196994Sphk#define	_MIPS_INCLUDE__ALIGN_H_
44196994Sphk
45196994Sphk/*
46196994Sphk * Round p (pointer or byte index) up to a correctly-aligned value for all
47202031Simp * data types (int, long, ...).	  The result is u_long and must be cast to
48196994Sphk * any desired pointer type.
49196994Sphk */
50196994Sphk#define	_ALIGNBYTES	7
51202031Simp#define	_ALIGN(p)	(((u_long)(p) + _ALIGNBYTES) &~ _ALIGNBYTES)
52196994Sphk
53196994Sphk#endif /* !_MIPS_INCLUDE__ALIGN_H_ */
54