From owner-svn-src-projects@FreeBSD.ORG Fri Jul 10 19:06:15 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B66C610656AD; Fri, 10 Jul 2009 19:06:15 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A58FB8FC22; Fri, 10 Jul 2009 19:06:15 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n6AJ6FCh029301; Fri, 10 Jul 2009 19:06:15 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6AJ6F3T029299; Fri, 10 Jul 2009 19:06:15 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <200907101906.n6AJ6F3T029299@svn.freebsd.org> From: Warner Losh Date: Fri, 10 Jul 2009 19:06:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r195580 - projects/mips/sys/mips/include X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jul 2009 19:06:16 -0000 Author: imp Date: Fri Jul 10 19:06:15 2009 New Revision: 195580 URL: http://svn.freebsd.org/changeset/base/195580 Log: Fixed aligned macros... # I'm not sure bde will like this, but I want to commit it for others to review # as well. :) Modified: projects/mips/sys/mips/include/param.h Modified: projects/mips/sys/mips/include/param.h ============================================================================== --- projects/mips/sys/mips/include/param.h Fri Jul 10 19:04:32 2009 (r195579) +++ projects/mips/sys/mips/include/param.h Fri Jul 10 19:06:15 2009 (r195580) @@ -80,11 +80,11 @@ /* * 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. + * any desired pointer type. XXX u_int isn't big enough to hod a pointer. */ #define _ALIGNBYTES 7 -#define _ALIGN(p) (((u_int)(p) + _ALIGNBYTES) &~ _ALIGNBYTES) -#define ALIGNED_POINTER(p, t) ((((u_int32_t)(p)) & (sizeof (t) - 1)) == 0) +#define _ALIGN(p) (((uintptr_t)(p) + _ALIGNBYTES) &~ _ALIGNBYTES) +#define ALIGNED_POINTER(p, t) ((((uintptr_t)(p)) & (sizeof (t) - 1)) == 0) #define ALIGNBYTES _ALIGNBYTES #define ALIGN(p) _ALIGN(p)