From owner-freebsd-hackers Sat Sep 15 12:26:29 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from dragon.nuxi.com (trang.nuxi.com [66.92.13.169]) by hub.freebsd.org (Postfix) with ESMTP id 62C5337B408; Sat, 15 Sep 2001 12:26:23 -0700 (PDT) Received: (from obrien@localhost) by dragon.nuxi.com (8.11.6/8.11.1) id f8FJQFH72306; Sat, 15 Sep 2001 12:26:15 -0700 (PDT) (envelope-from obrien) Date: Sat, 15 Sep 2001 12:26:15 -0700 From: "David O'Brien" To: Warner Losh Cc: hackers@FreeBSD.ORG, Yar Tikhiy , Mike Smith , msmith@mass.dis.org Subject: Re: Driver structures & alignment Message-ID: <20010915122615.A72222@dragon.nuxi.com> Reply-To: hackers@FreeBSD.ORG References: <20010915110337.B53569@dragon.nuxi.com> <200109132309.f8DN9vX03967@mass.dis.org> <20010914122344.A38530@snark.rinet.ru> <20010915110337.B53569@dragon.nuxi.com> <200109151813.f8FIDwW02011@harmony.village.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200109151813.f8FIDwW02011@harmony.village.org>; from imp@harmony.village.org on Sat, Sep 15, 2001 at 12:13:58PM -0600 X-Operating-System: FreeBSD 5.0-CURRENT Organization: The NUXI BSD group X-Pgp-Rsa-Fingerprint: B7 4D 3E E9 11 39 5F A3 90 76 5D 69 58 D9 98 7A X-Pgp-Rsa-Keyid: 1024/34F9F9D5 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sat, Sep 15, 2001 at 12:13:58PM -0600, Warner Losh wrote: > In message <20010915110337.B53569@dragon.nuxi.com> "David O'Brien" writes: > : It is best to order this from largest to smallest size if you are worried > : about alignment holes, etc. > : > : int64_t d; /* 8-byte boundary */ > : int32_t c; /* 4-byte boundary */ > : int32_t f; /* 4-byte boundary */ > : int16_t a; > : int16_t b; > : int8_t e[4]; > > unfortunately, there are many device structures that are passed around > via DMA and hte like that don't let you do this... How come? The struct represents some [semi-]physical organization? -- -- David (obrien@FreeBSD.org) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message