From owner-freebsd-hackers@FreeBSD.ORG Sun Jul 11 03:58:36 2010 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 284251065672 for ; Sun, 11 Jul 2010 03:58:36 +0000 (UTC) (envelope-from doconnor@gsoft.com.au) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.freebsd.org (Postfix) with ESMTP id 8867F8FC16 for ; Sun, 11 Jul 2010 03:58:35 +0000 (UTC) Received: from ur.dons.net.au (ppp121-45-157-65.lns6.adl6.internode.on.net [121.45.157.65]) (authenticated bits=0) by cain.gsoft.com.au (8.14.4/8.14.3) with ESMTP id o6B3V165002994 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Sun, 11 Jul 2010 13:01:08 +0930 (CST) (envelope-from doconnor@gsoft.com.au) Mime-Version: 1.0 (Apple Message framework v1081) Content-Type: text/plain; charset=us-ascii From: "Daniel O'Connor" In-Reply-To: Date: Sun, 11 Jul 2010 13:01:00 +0930 Content-Transfer-Encoding: quoted-printable Message-Id: References: To: Christopher Bowman X-Mailer: Apple Mail (2.1081) X-Spam-Score: 0.163 () BAYES_00,RDNS_DYNAMIC X-Scanned-By: MIMEDefang 2.67 on 203.31.81.10 Cc: hackers@freebsd.org Subject: Re: Missing files device_if.h and bus_if.h X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jul 2010 03:58:36 -0000 On 11/07/2010, at 10:57, Christopher Bowman wrote: > #include "device_if.h" > #include "bus_if.h" >=20 > however, I don't see them any where in my source tree. Are these > missing or am I suppose to create them or are they built as part of > the build process and if the latter then why didn't I get a copy when > I built a custom kernel? >=20 > Where do I get these files? Could someone please clue me in here? They are part of the newbus infrastructure and are generated on the fly. An awk script (makeobjops.awk) generates them from the corresponding .m = file in src/sys/kern. > And since I am asking questions here, I see BUS_READ_IVAR used a > couple of places but can't find it's definition. Where is it defined? It is defined in (the generated) bus_if.h -> static __inline int BUS_READ_IVAR(device_t _dev, device_t _child, int = _index, uintptr_t *_result) { kobjop_t _m; KOBJOPLOOKUP(((kobj_t)_dev)->ops,bus_read_ivar); return ((bus_read_ivar_t *) _m)(_dev, _child, _index, _result); } -- Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C