Path: utzoo!attcan!uunet!cs.utexas.edu!tut.cis.ohio-state.edu!purdue!ames!uhccux!munnari.oz.au!murtoa.cs.mu.oz.au!ditmela!yarra!cit5!ajm From: ajm@cit5.cit.oz (Tony Mcgregor) Newsgroups: comp.unix.questions Subject: longjmp Message-ID: <1989Sep4.015651.25779@cit5.cit.oz> Date: 4 Sep 89 01:56:51 GMT Organization: Chisholm Institute of Technology, Melb., Australia Lines: 43 I am trying to use setjmp and longjump to do context switching within a single process. I'm confused by the manual entry which says >SETJMP(3C-ucb) Pyramid OSx Operating System SETJMP(3C-ucb) > >[...] > > longjmp(env, val) > jmp_buf env; > >[...] > > Using setjmp/longjmp for context switching > > Setjmp and longjmp can be used to switch between different > contexts withing a single process. > >[...] > > NOTE: The argument given to longjmp > is ignored when using longjmp to switch context. > > >[...] > > 5) Use longjmp with the appropriate (previously saved) > context buffer to switch to the new context. > So how do I specify the context if longjmp ignores it's argument? Thanks for your help. Tony ---------------------------------------------------------------------------- Tony McGregor Department of Robotics and Digital Tech., Chisholm Institute of Technology PO Box 197, Caulfield East, Vic 3145, Australia Phone: +61 3 5732014 Fax: +61 3 5721298 ACSNET: ajm@cit5.cit.oz ----------------------------------------------------------------------------