Date: Wed, 12 Jul 2006 09:10:33 +0100 (BST) From: Jan Grant <jan.grant@bristol.ac.uk> To: Attilio Rao <attilio@freebsd.org> Cc: freebsd-hackers@freebsd.org, "mag@intron.ac" <mag@intron.ac> Subject: Re: kern/99979: Get Ready for Kernel Module in C++ Message-ID: <20060712090552.Q82414@tribble.ilrt.bris.ac.uk> In-Reply-To: <3bbf2fe10607111437h6547432fn2887348708df29a4@mail.gmail.com> References: <84dead720607092015q7f1701abse143f3855c2aa95a@mail.gmail.com> <44B2D2DF.2000401@sh.cvut.cz> <86sll8zl9x.fsf@xps.des.no> <courier.44B35DBC.00003F75@intron.ac> <86fyh8zgw8.fsf@xps.des.no> <courier.44B37714.00004B4D@intron.ac> <868xn0z8w9.fsf@xps.des.no> <courier.44B3B9A0.0000609C@intron.ac> <20060711152949.GB1463@merlin.emma.line.org> <1152642474.29859@origin.intron.ac> <3bbf2fe10607111437h6547432fn2887348708df29a4@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060712090552.Q82414>