From owner-freebsd-hackers@FreeBSD.ORG Wed Jul 12 08:10:53 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 036B816A4DA; Wed, 12 Jul 2006 08:10:53 +0000 (UTC) (envelope-from jan.grant@bristol.ac.uk) Received: from diri.bris.ac.uk (diri.bris.ac.uk [137.222.10.112]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7FBFE43D46; Wed, 12 Jul 2006 08:10:52 +0000 (GMT) (envelope-from jan.grant@bristol.ac.uk) Received: from mail.ilrt.bris.ac.uk ([137.222.16.62]) by diri.bris.ac.uk with esmtp (Exim 4.60) (envelope-from ) id 1G0Zo1-0005eJ-UC; Wed, 12 Jul 2006 09:10:51 +0100 Received: from cse-jg.cse.bris.ac.uk ([137.222.12.37]:50257) by mail.ilrt.bris.ac.uk with esmtps (TLSv1:AES256-SHA:256) (Exim 4.50) id 1G0Znq-00020Z-Qj; Wed, 12 Jul 2006 09:10:44 +0100 Date: Wed, 12 Jul 2006 09:10:33 +0100 (BST) From: Jan Grant X-X-Sender: cmjg@tribble.ilrt.bris.ac.uk To: Attilio Rao In-Reply-To: <3bbf2fe10607111437h6547432fn2887348708df29a4@mail.gmail.com> Message-ID: <20060712090552.Q82414@tribble.ilrt.bris.ac.uk> References: <84dead720607092015q7f1701abse143f3855c2aa95a@mail.gmail.com> <44B2D2DF.2000401@sh.cvut.cz> <86sll8zl9x.fsf@xps.des.no> <86fyh8zgw8.fsf@xps.des.no> <868xn0z8w9.fsf@xps.des.no> <20060711152949.GB1463@merlin.emma.line.org> <1152642474.29859@origin.intron.ac> <3bbf2fe10607111437h6547432fn2887348708df29a4@mail.gmail.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spamassassin: mail.ilrt.bris.ac.uk X-Spam-Score: 0.0 X-Spam-Level: / X-Spam-Score: -1.4 X-Spam-Level: - Cc: freebsd-hackers@freebsd.org, "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: Wed, 12 Jul 2006 08:10:53 -0000 On Tue, 11 Jul 2006, Attilio Rao wrote: > Even if I have no proof-of-concepts (so maybe somebody can show that > this is not fair), if we have setjmp/longjmp in the kernel we can have > a correct exception handling mechanism without not great problems. You'd think that, but at least one issue is that not all kernel resources are manageable via RAII*. So whilst you might be able to stack unwind, you're still left with a really hairy resource management problem - potentially at every frame - which often doesn't improve on the error checking and throwing idioms as expressed in C. I think it'd be interesting to try to address this but "I don't think you want to start from here". jan * for the non-C++ buffs, "Resource Acquisition Is Initialisation": using automatic variables of types with destructors that clean up the underlying resources when they go out of scope. -- jan grant, ISYS, University of Bristol. http://www.bris.ac.uk/ Tel +44 (0)117 3317661 http://ioctl.org/jan/ YKYBPTMRogueW... you try to move diagonally in vi.