Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!purdue!haven!mimsy!chris From: chris@mimsy.umd.edu (Chris Torek) Newsgroups: comp.lang.c Subject: Re: Longjmping back, and back again; Coroutines in C Message-ID: <20844@mimsy.umd.edu> Date: 20 Nov 89 18:16:23 GMT References: <457@enea.se> Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 15 In article <457@enea.se> jerker@enea.se (Jerker W}gberg) writes: >instead of actually switching stacks, I use the "real" stack but >swap it in and out of malloced memory. > >1. Can somebody explain why this fails on a SUN4. I suspect it defers writing into the stack until absolutely necessary. You thus save the data before it exists. Your technique will also fail on machines that have several simultaneously active stacks (e.g., Pyramid) or no stack (probably no such machines run C). -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163) Domain: chris@cs.umd.edu Path: uunet!mimsy!chris