[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Fiber thing?
- From: "Alex Bilyk" <nebula-crl-2688@...>
- Date: Sat, 8 Jun 2002 23:11:37 -0700
Fun, fun, fun:) I figured it would take a pair of SJ/LJ per context switch
and that was about it. 512 bytes to be copied per switch on Win32. Somehow I
don't think non-preservation of locals is a big deal.I might try to run this
puppy one of these days just for the fun of it.
Thanks a lot,
----- Original Message -----
From: "Björn De Meyer" <firstname.lastname@example.org>
To: "Multiple recipients of list" <email@example.com>
Sent: Saturday, June 08, 2002 1:29 PM
Subject: Re: Fiber thing?
For more on setjmp/longjmp fibers
please look at the following page:
It describes a scheduler written in ANSI C using only
setjmp and longjmp. It has one major deficiency,
that is, it does not copy the stack. So you cannot use
non-static local variables in the functions that are
running in parallel as coroutines/fibers.
But, perhaps it is possible to perform this feat with
just plain ANSI C. Is anyone here courageous enough to try?
"No one knows true heroes, for they speak not of their greatness." --
Björn De Meyer