Messages in this thread | | | From | Roland McGrath <> | Subject | Re: [RFC] x86: xsave/xrstor support, ucontext_t extensions | Date | Thu, 22 May 2008 18:33:53 -0700 (PDT) |
| |
> What I was doing in the RFC is: restore the state what ever that was > present and init the state that was not present in the stack frame.
That is consistent in spirit with the existing treatment of FPU data. That is, if the sigcontext.fpstate pointer is NULL, the thread's FPU state is reset to default. (And despite what hpa said about being "supported", the facts in the code are that sigreturn just follows the sigcontext.fpstate pointer, whatever it is. On 32-bit, the pointer is NULL in the context saved when the thread had not used the FPU, so modifying the sigcontext to include FP state when it didn't before requires putting in some user-chosen pointer. There in fact may well be existing code that does user-level coroutine switching using sigreturn and relies on this, for all we know.)
Thanks, Roland
| |