flaig@apple.com (Charles Flaig) (06/05/91)
[This is posted for a friend of mine. I'll track discussion in this group for a week or so, and you can also mail replys to my account. Just don't expect me to be able to discuss the problem because I'm clueless.] I would appreciate hearing from anyone who has figured out a SAFE way to implement thread context switching on the SPARC using setjmp - longjmp. Apparently, on the SPARC, longjmp can only be used to jump up "higher" on the stack because longjmp does some special register restores which assume one is jumping back "higher" in the stack. I need to be able to jump to arbitrary places within the stack each time I do a thread context switch. For this particular project, I am not able to use Sun's lightweight threads package. C or C++ level solutions are preferred, but assembly language code solutions would do the job. Also any leads to someone else who might know.... --Charles flaig@apple.com