This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: [PATCH] PPC64 Add ucontext.h and *context functions
- From: "Steve Munroe" <sjmunroe at us dot ibm dot com>
- To: Paul Mackerras <paulus at samba dot org>, "David Engebretsen" <engebret at us dot ibm dot com>
- Cc: Franz dot Sirl-kernel at lauterbach dot com, libc-alpha at sources dot redhat dot com, "Peter Bergner" <bergner at us dot ibm dot com>
- Date: Fri, 17 Jan 2003 10:21:50 -0600
- Subject: Re: [PATCH] PPC64 Add ucontext.h and *context functions
Paul Mackerras writes:
> 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.
I eagerly await the number. When we know which kernel version implements
NR_setcontext, I'll add __ASSUME_SETCONTEXT_SYSCALL to kernel_features.h
and avoid the ENOSYS.
> 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).
If the user can change the FEx bits but we reset them on the next
get/setcontext that's a bug. I would like to avoid multiple syscalls to
obtain what a single getcontext syscall can. The getcontext/setcontext pair
is functionally complete. And I need them in a 2.4.xx kernel.