From owner-freebsd-hackers Fri Dec 13 14: 0: 0 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E0BE237B401 for ; Fri, 13 Dec 2002 13:59:59 -0800 (PST) Received: from whizzo.transsys.com (whizzo.TransSys.COM [144.202.42.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0607143EDA for ; Fri, 13 Dec 2002 13:59:59 -0800 (PST) (envelope-from louie@whizzo.transsys.com) Received: from whizzo.transsys.com (#6@localhost.transsys.com [127.0.0.1]) by whizzo.transsys.com (8.12.6/8.12.6) with ESMTP id gBDLxw4E012114; Fri, 13 Dec 2002 16:59:58 -0500 (EST) (envelope-from louie@whizzo.transsys.com) Message-Id: <200212132159.gBDLxw4E012114@whizzo.transsys.com> X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 To: Daniel Lang Cc: freebsd-hackers@FreeBSD.ORG X-Image-URL: http://www.transsys.com/louie/images/louie-mail.jpg From: "Louis A. Mamakos" Subject: Re: more kernel programming style questions References: <20021213115507.GE84493@atrbg11.informatik.tu-muenchen.de> In-reply-to: Your message of "Fri, 13 Dec 2002 12:55:07 +0100." <20021213115507.GE84493@atrbg11.informatik.tu-muenchen.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 13 Dec 2002 16:59:58 -0500 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 I'm not holding this up as the best example of style, but take a look at the Bt848 driver in /sys/pci for one approach. Some years ago I contributed some patches that got integrated that turned those offset references into a structure definition. The structure definition was done with some macros so that you can hide compile byte-order dependencies.. louie To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message