This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] PPC64 Add ucontext.h and *context functions


Steve Munroe writes:

> I agree that a setcontext syscall would be a better solution. Especially
> since setcontext currently requires a syscall (to restore the sigprocmask)
> anyway. However I wanted to get this function out so other projects can
> make progress while we prefect the solution.

All we need is the setcontext syscall number assigned, then current
kernels will give us an ENOSYS and we go do things exactly as in your
patch.  I was trying to say that the whole point of the rt_sigreturn
hack is to cope with older kernels (including current kernels :)
and that doing it in a way which is incompatible with older kernels
therefore makes no sense.

> We should also consider a getcontext syscall since only the kernel can
> capture the complete context (including the sigprocmask and the FE bits of
> the MSR).

I think a getcontext syscall is a good idea, although I don't know
what userspace needs to know the MSR value for.  The FE0/1 bits can be
obtained through the prctl syscall in 2.5 (at least for ppc32) and
that will hopefully go into 2.4 shortly (/me pokes himself to submit
the patch to Marcelo).

Paul.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]