mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: "John W. M. Stevens" <john@betelgeuse.us>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: Setjmp/Longjmp in the kernel?
Date: 10 Feb 2003 13:00:42 +0000	[thread overview]
Message-ID: <1044882041.418.1.camel@irongate.swansea.linux.org.uk> (raw)
In-Reply-To: <20030209221044.GA8761@morningstar.nowhere.lie>

On Sun, 2003-02-09 at 22:10, John W. M. Stevens wrote:
> Among these is a simple exception support system.  The core
> of this system is based on the existence of a setjmp/longjmp
> facility.  In digging through the source code, I've found a
> few, architechturally specific implementations of such a
> facility, but no generalized, multi-platform support.

setjmp/longjmp are normally very hard to follow and maintain,
especially when the kernel has locks, sleeping rules and
multiple threads flying around.

You will see lots of code which does either


int foo_func()
{
	alloc this
	alloc that
	_foo_func()
	free this
	free that
}

or has a single exit path and uses goto out type constructs 

instead


  reply	other threads:[~2003-02-10 11:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-09 22:10 John W. M. Stevens
2003-02-10 13:00 ` Alan Cox [this message]
2003-02-10 22:24   ` Olaf Titz
2003-02-12 10:55     ` Kasper Dupont
2003-02-12 19:45       ` John W. M. Stevens

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1044882041.418.1.camel@irongate.swansea.linux.org.uk \
    --to=alan@lxorguk.ukuu.org.uk \
    --cc=john@betelgeuse.us \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®