longjmp

Tony Mcgregor ajm at cit5.cit.oz
Mon Sep 4 11:56:51 AEST 1989


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 at cit5.cit.oz
----------------------------------------------------------------------------



More information about the Comp.unix.questions mailing list