Subject: Re: setjmp/longjmp and pth
To: None <port-vax@netbsd.org>
From: Matthew Fredette <fredette@MIT.EDU>
List: port-vax
Date: 12/13/2000 00:05:07
> > Because it has to restore any registers saved by intermediate call
> > frames (in the "normal" case, that is). Arguably all registers should
> > be saved into the jmp_buf; I don't know why that isn't how it's done.
>
> setjmp/longjmp aren't required to preserve general registers; that's
> why setjmp(3) says that values of all non-volatile autos modified
> between the setjmp and longjmp are unpredictable.
I screwed up here. The setjmp/longjmp combination *does* have to
preserve the general registers that must normally be preserved across
any function call. The non-volatile autos being unpredictable is not
tied to that; that just happens whenever you mess with flow control.
To track pth not working, I filed port-vax/11698. There's patches
in there for setjmp/longjmp that get pth working for me.
Matt
--
Matt Fredette
fredette@aquery.com, fredette@mit.edu, fredette@theory.lcs.mit.edu
http://mit.edu/fredette/www
"If you understood everything I said, you'd be me." - Miles Davis