In article <EpWdncwxzfxhayLYnZ2dnUVZ_uCinZ2d@[EMAIL PROTECTED]
>,
Frank J. Lhota <FrankLho.NOSPAM@[EMAIL PROTECTED]
> wrote:
> ... The function coswitch() is used to change
> the C stack to the one associated with the co-expression that will soon
gain
> control. Needless to say, coswitch is extremely platform specific. All
> implementations of coswitch use some assembler. The coswitch function
> depends on the machine archetecture, the OS conventions, and even the
> specific details of the compiler implementation. On some platforms,
> switching the C stack is quite simple. On others, it is nearly
impossible,
> requiring that Icon / Unicon be implemented without co-exopressions.
Actually, the current version of Icon includes a coswitch function in C
that uses POSIX threads for stack management. I don't know of any modern
platform where this doesn't work. It's been tested on the PowerPC G5,
AMD X64, and Intel Itanium architectures, as well platforms such as the
X86 and Sparc that have assembler alternatives available.
---------------------------------------------------------------------------
Gregg Townsend Staff Scientist The University of Arizona
gmt@[EMAIL PROTECTED]
Computer Science Tucson, Arizona, USA


|