[Stackless] can it be done with setjmp/longjmp?

Christian Tismer tismer at tismer.com
Tue Feb 26 12:09:41 CET 2002

Sam M. Rushing wrote:

> I'm wondering if what you're doing can't be done with setjmp/longjmp.
> I've found several user-threads libraries that get by with just setjmp
> (as opposed to assembly code):


Yes, I'm pretty sure it is possible.
To unwind the stack, I can use setjmp/longjmp.
To rebuild it, I can use alloca.

This technique is a little more expensive, and
it is a bit tricky, but I think to provide
such an option as a fallback solution.

Still tricky is how to compute stack sizes,
without abusing knowpedge about the setjmp

ciao - chris

Christian Tismer             :^)   <mailto:tismer at tismer.com>
Mission Impossible 5oftware  :     Have a break! Take a ride on Python's
Kaunstr. 26                  :    *Starship* http://starship.python.net/
14163 Berlin                 :     PGP key -> http://wwwkeys.pgp.net/
PGP Fingerprint       E182 71C7 1A9D 66E9 9D15  D3CC D4D7 93E2 1FAE F6DF
      where do you want to jump today?   http://www.stackless.com/

Stackless mailing list
Stackless at www.tismer.com

More information about the Stackless mailing list