From owner-freebsd-hackers Sun Sep 30 18:25:45 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from wantadilla.lemis.com (wantadilla.lemis.com [192.109.197.80]) by hub.freebsd.org (Postfix) with ESMTP id E82EE37B410 for ; Sun, 30 Sep 2001 18:25:40 -0700 (PDT) Received: by wantadilla.lemis.com (Postfix, from userid 1004) id 15C1A6AB08; Mon, 1 Oct 2001 10:56:24 +0930 (CST) Date: Mon, 1 Oct 2001 10:56:24 +0930 From: Greg Lehey To: Julian Elischer Cc: Gersh , Bernd Walter , Anjali Kulkarni , freebsd-hackers@FreeBSD.ORG Subject: Re: setjmp/longjmp Message-ID: <20011001105624.C31215@wantadilla.lemis.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from julian@elischer.org on Fri, Sep 28, 2001 at 10:12:14AM -0700 Organization: The FreeBSD Project Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-418-838-708 WWW-Home-Page: http://www.FreeBSD.org/ X-PGP-Fingerprint: 6B 7B C3 8C 61 CD 54 AF 13 24 52 F8 6D A4 95 EF Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG [Format recovered--see http://www.lemis.com/email/email-format.html] On Friday, 28 September 2001 at 10:12:14 -0700, Julian Elischer wrote: > On Fri, 28 Sep 2001, Gersh wrote: >> On Fri, 28 Sep 2001, Bernd Walter wrote: >>> On Fri, Sep 28, 2001 at 07:03:51PM +0530, Anjali Kulkarni wrote: >>>> Does anyone know whether it is advisable or not to use >>>> setjmp/longjmp within kernel code? I could not see any >>>> setjmp/longjmp in kernel source code. Is there a good reason for >>>> this or can it be used? >>> >>> You need to look again, it's used in several places in the kernel. >> >> Look at sys/i386/i386/db_interface.c > > Yeah but it would probably be a pretty bad idea to use it without > very careful thought. Especialy with the kernel becoming > pre-emptable in the future.. Can you think of a scenario where it wouldn't work? Preemption doesn't tear stacks apart, right? Greg -- When replying to this message, please take care not to mutilate the original text. For more information, see http://www.lemis.com/email.html See complete headers for address and phone numbers To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message