From owner-freebsd-hackers Thu Sep 13 14:30:56 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from Awfulhak.org (gw.Awfulhak.org [217.204.245.18]) by hub.freebsd.org (Postfix) with ESMTP id 7877A37B405; Thu, 13 Sep 2001 14:30:52 -0700 (PDT) Received: from hak.lan.Awfulhak.org (root@hak.lan.Awfulhak.org [fec0::1:12]) by Awfulhak.org (8.11.6/8.11.6) with ESMTP id f8DLUoi22040; Thu, 13 Sep 2001 22:30:50 +0100 (BST) (envelope-from brian@freebsd-services.com) Received: from hak.lan.Awfulhak.org (brian@localhost [127.0.0.1]) by hak.lan.Awfulhak.org (8.11.6/8.11.6) with ESMTP id f8DLUkd97146; Thu, 13 Sep 2001 22:30:46 +0100 (BST) (envelope-from brian@freebsd-services.com) Message-Id: <200109132130.f8DLUkd97146@hak.lan.Awfulhak.org> X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 To: Yar Tikhiy Cc: hackers@FreeBSD.ORG, brian@freebsd-services.com Subject: Re: Driver structures & alignment In-Reply-To: Message from Yar Tikhiy of "Thu, 13 Sep 2001 23:23:52 +0400." <20010913232352.A23874@snark.rinet.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 13 Sep 2001 22:30:46 +0100 From: Brian Somers 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 > Hi there, > > Is there a single blessed way to define packed structures > for use in drivers? I suspect that using "#pragma pack(1)" > will lead to alignment errors in non-Intel architectures. gcc deals with it, certainly on alpha anyway. However, I don't think anyone would ever bless using packed structures as it hurts memory transfers. I prefer the fix-it-up-when-I-need-it-packed approach :*) > -- > Yar -- Brian http://www.freebsd-services.com/ Don't _EVER_ lose your sense of humour ! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message