From owner-cvs-all Mon Dec 14 15:47:43 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id PAA02473 for cvs-all-outgoing; Mon, 14 Dec 1998 15:47:43 -0800 (PST) (envelope-from owner-cvs-all@FreeBSD.ORG) Received: from ns1.yes.no (ns1.yes.no [195.204.136.10]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id PAA02453; Mon, 14 Dec 1998 15:47:39 -0800 (PST) (envelope-from eivind@bitbox.follo.net) Received: from bitbox.follo.net (bitbox.follo.net [195.204.143.218]) by ns1.yes.no (8.9.1a/8.9.1) with ESMTP id AAA20279; Tue, 15 Dec 1998 00:47:31 +0100 (CET) Received: (from eivind@localhost) by bitbox.follo.net (8.8.8/8.8.6) id AAA43606; Tue, 15 Dec 1998 00:47:31 +0100 (MET) Message-ID: <19981215004730.U5444@follo.net> Date: Tue, 15 Dec 1998 00:47:30 +0100 From: Eivind Eklund To: Matt Dillon , cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG Subject: Re: cvs commit: src/sys/sys sem.h References: <199812142134.NAA18826@freefall.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.93.2i In-Reply-To: <199812142134.NAA18826@freefall.freebsd.org>; from Matt Dillon on Mon, Dec 14, 1998 at 01:34:56PM -0800 Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk On Mon, Dec 14, 1998 at 01:34:56PM -0800, Matt Dillon wrote: > dillon 1998/12/14 13:34:56 PST > > Modified files: > sys/sys sem.h > Log: > Remove hardwired alignment, align to sizeof(long) which should be more > portable (though the hardwired alignment of 16 would also have worked just > fine and perhaps even resulted in better L1 cache operation). This is a bad alignment. The correct restriction is something like struct aligner { char dummy; union { float f; double d; long int l; void *p; struct something *pstruct; void (*func)(); } offsetter; }; Align at offsetof(struct aligner, offsetter); 16 is better than sizeof(long), I think. (I hope I got the set of types above correct - I think the pointer set is right, at least). Eivind. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message