> > I used to be at Sun. I knew those warnings too. If we use longjmp > > carefully, we can make it. In the worst case, write our own version. > > ..Or we could use setcontext/getcontext, could we not?
The setcontext/getcontext will be much worse than setjmp/longjmp. The are more platform specific than longjmp. And they don't work well inside signal handler, just like longjmp. When I was working on HotSpot JVM, we had some problems with getcontext. They work 99.99% of time. We added many workaround for the .01% cases. I believe the Solaris guys have been improving the code. I am not sure of the current status. Hong