From owner-freebsd-hackers@FreeBSD.ORG Wed Jul 12 18:43:55 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 AC44C16A4E1 for ; Wed, 12 Jul 2006 18:43:55 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.231]) by mx1.FreeBSD.org (Postfix) with ESMTP id BDA3143D46 for ; Wed, 12 Jul 2006 18:43:51 +0000 (GMT) (envelope-from asmrookie@gmail.com) Received: by wr-out-0506.google.com with SMTP id 69so188419wra for ; Wed, 12 Jul 2006 11:43:51 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=jMe2UW33zRtALcFyBVI3t0LKNmON6Gn9g9k4FLENAmH826EDThu6jiEux+8FfSAtdEHPoNxuioAN4iT8PqIoBx2Cnl8FkMzZiwdE1toXxIC+HvON5QB91LxznKP2BnrUNsI2o1fGDNYukh4o3StOxsoNT1jGnl85KL9QBPjmulI= Received: by 10.54.149.14 with SMTP id w14mr1134752wrd; Wed, 12 Jul 2006 11:43:50 -0700 (PDT) Received: by 10.70.11.15 with HTTP; Wed, 12 Jul 2006 11:43:50 -0700 (PDT) Message-ID: <3bbf2fe10607121143n1a5fba00ueee37ecfe14a1ce1@mail.gmail.com> Date: Wed, 12 Jul 2006 20:43:50 +0200 From: "Attilio Rao" Sender: asmrookie@gmail.com To: freebsd-hackers@freebsd.org In-Reply-To: <20060712113516.GC2162@britannica.bec.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <44B2D2DF.2000401@sh.cvut.cz> <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> <20060712113516.GC2162@britannica.bec.de> X-Google-Sender-Auth: db2de2fe30528c93 Cc: joerg@britannica.bec.de 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 18:43:55 -0000 2006/7/12, Joerg Sonnenberger : > On Tue, Jul 11, 2006 at 11:37:52PM +0200, 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. > > ROFL. Sorry, but using setjmp/longjmp is one of the worst possible > implementation of exceptions since it is very expensive for the hot > path, where you don't expect exceptions. They are called "exception" for > a reason. Well, this is not what I meant. As exceptions are performed through stack unrolling (which is the basic mechanism of setjmp/longjmp) it might not be impossible to implement the correct try/catch mechanism in a correct way (even in freestanding). That's all. No reference to how to do it :) Attilio -- Peace can only be achieved by understanding - A. Einstein