From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 11 15:24:56 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org 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 553EB16A4E0 for ; Tue, 11 Jul 2006 15:24:56 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id 93FE643D6D for ; Tue, 11 Jul 2006 15:24:55 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.13.4/8.13.4) with ESMTP id k6BFO4N3075157; Tue, 11 Jul 2006 11:24:04 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Tue, 11 Jul 2006 11:15:58 -0400 User-Agent: KMail/1.9.1 References: <200607092136.k69LaNDX055391@www.freebsd.org> <86zmfg42bd.fsf@xps.des.no> In-Reply-To: <86zmfg42bd.fsf@xps.des.no> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200607111115.59844.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Tue, 11 Jul 2006 11:24:04 -0400 (EDT) X-Virus-Scanned: ClamAV 0.87.1/1591/Mon Jul 10 15:41:02 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on server.baldwin.cx Cc: Dag-Erling =?iso-8859-1?q?Sm=F8rgrav?= , Matthias Andree , delphij@delphij.net, Julian Elischer , mag@intron.ac Subject: Re: kern/99979: Get Ready for Kernel Module in C++ 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: Tue, 11 Jul 2006 15:24:56 -0000 On Tuesday 11 July 2006 10:57, Dag-Erling Sm=F8rgrav wrote: > > For example, I think C++ exception handling is really poorly suited for > > low-level code. >=20 > Exception handling is required by the standard, even for freestanding > implementations. Standards aside, in Darwin, the C++ Apple uses does not have any exception handling or RTTI (and maybe not even templates). They use their own set of meta classes to implement an RTTI-like system that allows for future changes in the ABI. You would also benefit from doing some of your own research. > > But the "object model" is still obscure to understand no matter how many > > people all over the world master C++. >=20 > The fact that you don't understand it doesn't mean it's bad. No, but it is obtuse. And very underused. How many device drivers do you know of that use kobj inheritance? > > What's more, can the "object model" function really as OpenDarwin's > > IOKit class model? >=20 > Does it need to? He's trying to port IOKit to FreeBSD for his exercise (if you had read his first e-mail you'd know that). > > Well, you can LOOK DOWN UPON me, but I believe you cannot throw doubt on > > FreeBSD's actuality: so weak USB support (kernel crash easier than many > > other OSs that we laughed at and that we are laughing at), so weak PCI > > device support. >=20 > Please provide references to the PRs you filed about these issues. USB crashes are not that uncommon, and compared to other OS's (such as Wind= ows=20 and OS X both of which I've written a PCI driver for) we require device=20 driver writers to go through a lot more hoops to do certain things like=20 allocate resources. At the very least there is much that can be improved i= n=20 our driver model. =2D-=20 John Baldwin