From owner-freebsd-alpha@FreeBSD.ORG Thu Jan 8 13:48:34 2004 Return-Path: Delivered-To: freebsd-alpha@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A917716A4E1 for ; Thu, 8 Jan 2004 13:48:34 -0800 (PST) Received: from mail1.speakeasy.net (mail1.speakeasy.net [216.254.0.201]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5E94043D5D for ; Thu, 8 Jan 2004 13:48:32 -0800 (PST) (envelope-from jhb@FreeBSD.org) Received: (qmail 17625 invoked from network); 8 Jan 2004 21:48:31 -0000 Received: from dsl027-160-063.atl1.dsl.speakeasy.net (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) encrypted SMTP for ; 8 Jan 2004 21:48:31 -0000 Received: from 10.50.40.206 (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.12.10/8.12.10) with ESMTP id i08LmOM0039402; Thu, 8 Jan 2004 16:48:25 -0500 (EST) (envelope-from jhb@FreeBSD.org) From: John Baldwin To: des@des.no (Dag-Erling =?iso-8859-1?q?Sm=F8rgrav?=) Date: Thu, 8 Jan 2004 16:45:23 -0500 User-Agent: KMail/1.5.4 References: <200401081542.49500.jhb@FreeBSD.org> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200401081645.24241.jhb@FreeBSD.org> X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) cc: alpha@freebsd.org Subject: Re: structure padding X-BeenThere: freebsd-alpha@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the Alpha List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2004 21:48:34 -0000 On Thursday 08 January 2004 04:28 pm, Dag-Erling Sm=F8rgrav wrote: > John Baldwin writes: > > Maybe: > > > > struct eproc { > > union { > > pid_t e_sid; > > long e_oldspare; > > } > > long e_spare[1]; > > > > (I think gcc supports anonymous unions like that.) > > I thought about that, but it's butt-ugly... > > Does anyone have an Alpha running 4.x that I could test this on? > > > In 6.0 you could remove the union hack and change the ABI, assuming that > > you want to put this in 5.x as well. > > 5.x has a completely different struct kinfo_proc which already > contains the session id. Actually, why not just use a long for the e_sid instead of pid_t? A long w= ill=20 certainly fit a pid_t. Doesn't hurt for it to be too big. So just: char e_comm[] long e_sid; long e_spare; =2D-=20 John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" =3D http://www.FreeBSD.org