lkml.org 
[lkml]   [2003]   [Feb]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Setjmp/Longjmp in the kernel?
From
Date
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

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:33    [W:0.039 / U:0.508 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site