From ff0673c19523d5b6bd01a362faa04af8f4ca9c13 Mon Sep 17 00:00:00 2001 From: briggs Date: Sat, 8 Mar 1997 16:17:07 +0000 Subject: Sync with NetBSD of about 4 March. --- sys/arch/mac68k/include/param.h | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'sys/arch/mac68k/include/param.h') diff --git a/sys/arch/mac68k/include/param.h b/sys/arch/mac68k/include/param.h index a9fed796565..06b9d6b78c0 100644 --- a/sys/arch/mac68k/include/param.h +++ b/sys/arch/mac68k/include/param.h @@ -1,5 +1,5 @@ -/* $OpenBSD: param.h,v 1.5 1996/05/26 18:35:56 briggs Exp $ */ -/* $NetBSD: param.h,v 1.26 1996/05/05 06:17:49 briggs Exp $ */ +/* $OpenBSD: param.h,v 1.6 1997/03/08 16:17:00 briggs Exp $ */ +/* $NetBSD: param.h,v 1.28 1997/03/01 06:57:45 scottr Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -97,9 +97,16 @@ * Round p (pointer or byte index) up to a correctly-aligned value * for all data types (int, long, ...). The result is u_int and * must be cast to any desired pointer type. + * + * ALIGNED_POINTER is a boolean macro that checks whether an address + * is valid to fetch data elements of type t from on this architecture. + * This does not reflect the optimal alignment, just the possibility + * (within reasonable limits). + * */ -#define ALIGNBYTES (sizeof(int) - 1) -#define ALIGN(p) (((u_int)(p) + ALIGNBYTES) &~ ALIGNBYTES) +#define ALIGNBYTES (sizeof(int) - 1) +#define ALIGN(p) (((u_int)(p) + ALIGNBYTES) &~ ALIGNBYTES) +#define ALIGNED_POINTER(p,t) ((((u_long)(p)) & (sizeof(t)-1)) == 0) #define PGSHIFT 12 /* LOG2(NBPG) */ #define NBPG (1 << PGSHIFT) /* bytes/page */ @@ -135,7 +142,9 @@ * of the hardware page size. */ #define MSIZE 128 /* size of an mbuf */ +#ifndef MCLSHIFT #define MCLSHIFT 11 /* convert bytes to m_buf clusters */ +#endif /* MCLSHIFT */ #define MCLBYTES (1 << MCLSHIFT) /* size of an m_buf cluster */ #define MCLOFSET (MCLBYTES - 1) /* offset within an m_buf cluster */ -- cgit v1.2.3