Date: Thu, 9 Jan 2003 19:16:40 +0100 From: Erik Trulsson <ertr1013@student.uu.se> To: Pawel Jakub Dawidek <P.Dawidek@prioris.mini.pw.edu.pl> Cc: Jake Burkholder <jake@locore.ca>, freebsd-hackers@freebsd.org Subject: Re: Exceptions via setjmp/longjmp in kernel. Message-ID: <20030109181640.GA66243@falcon.midgard.homeip.net> In-Reply-To: <20030109162520.GB51455@prioris.mini.pw.edu.pl> References: <20030109143059.GC47263@prioris.mini.pw.edu.pl> <20030109110355.C4032@locore.ca> <20030109162520.GB51455@prioris.mini.pw.edu.pl>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jan 09, 2003 at 05:25:20PM +0100, Pawel Jakub Dawidek wrote: > On Thu, Jan 09, 2003 at 11:03:55AM -0500, Jake Burkholder wrote: > +> The kernel longjmp only ever seems to return 1. See i386/i386/support.s. > > That's right, thanks! > > But this is strange, setjmp/longjmp are defined in C99 and there > setjmp() returns value from longjmp(). setjmp/longjmp are defined in C99 for *hosted* C implementations. When compiling a kernel one is almost certainly using a freestanding C implementatio, which basically means that there are only a few library facilities that need be present. Setjmp/longjmp is not among them. This means that for the kernel setjmp/longjmp the C standard has nothing to say about their behaviour. It might of course be desirable to make them work the same as the standard facilities as far as it is practical, but it is not always practical. -- <Insert your favourite quote here.> Erik Trulsson ertr1013@student.uu.se To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030109181640.GA66243>