From owner-freebsd-hackers Sat Sep 15 11:15:18 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from rover.village.org (rover.bsdimp.com [204.144.255.66]) by hub.freebsd.org (Postfix) with ESMTP id 95D1437B407; Sat, 15 Sep 2001 11:15:15 -0700 (PDT) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.11.3/8.11.3) with ESMTP id f8FIDxn00891; Sat, 15 Sep 2001 12:13:59 -0600 (MDT) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (localhost.village.org [127.0.0.1]) by harmony.village.org (8.11.3/8.11.4) with ESMTP id f8FIDwW02011; Sat, 15 Sep 2001 12:13:58 -0600 (MDT) (envelope-from imp@harmony.village.org) Message-Id: <200109151813.f8FIDwW02011@harmony.village.org> To: hackers@FreeBSD.ORG Subject: Re: Driver structures & alignment Cc: Yar Tikhiy , Mike Smith , msmith@mass.dis.org In-reply-to: Your message of "Sat, 15 Sep 2001 11:03:37 PDT." <20010915110337.B53569@dragon.nuxi.com> References: <20010915110337.B53569@dragon.nuxi.com> <200109132309.f8DN9vX03967@mass.dis.org> <20010914122344.A38530@snark.rinet.ru> Date: Sat, 15 Sep 2001 12:13:58 -0600 From: Warner Losh 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 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... Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message