public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* sigcontext on Linux-ppc in user space
@ 2001-01-24  0:56 John Kacur
  2001-01-24  7:02 ` Andreas Jaeger
  0 siblings, 1 reply; 2+ messages in thread
From: John Kacur @ 2001-01-24  0:56 UTC (permalink / raw)
  To: linux-kernel

Does anyone know how to get at the struct sigcontext in a signal handler
on Linux for powerpc? sigaction of course lets you create a signal
handler as a function with the prototype void(*)(int, siginfo_t *, void
*)
where the last argument, a pointer to void, is the sigcontext. I believe
that the last argument is NOT defined by POSIX and so is implementation
dependent.

On Intel it seems sufficient to use #include <asm/sigcontext.h>
to get the definition of struct sigcontext, and then get the values
you'd like out of the signal handler. But on Linux for powerpc, the same
thing doesn't work. Does anyone know what the trick is here to
accomplish this?

Thanks in advance
John Kacur
jkacur@home.com
jekacur@ca.ibm.com
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: sigcontext on Linux-ppc in user space
  2001-01-24  0:56 sigcontext on Linux-ppc in user space John Kacur
@ 2001-01-24  7:02 ` Andreas Jaeger
  0 siblings, 0 replies; 2+ messages in thread
From: Andreas Jaeger @ 2001-01-24  7:02 UTC (permalink / raw)
  To: John Kacur; +Cc: linux-kernel

John Kacur <jkacur@home.com> writes:

> Does anyone know how to get at the struct sigcontext in a signal handler
> on Linux for powerpc? sigaction of course lets you create a signal
> handler as a function with the prototype void(*)(int, siginfo_t *, void
> *)
> where the last argument, a pointer to void, is the sigcontext. I believe
> that the last argument is NOT defined by POSIX and so is implementation
> dependent.
> 
> On Intel it seems sufficient to use #include <asm/sigcontext.h>
> to get the definition of struct sigcontext, and then get the values
> you'd like out of the signal handler. But on Linux for powerpc, the same
> thing doesn't work. Does anyone know what the trick is here to
> accomplish this?

You should never include kernel headers in user space.

If you have a glibc 2.1 (or newer) based system, just include
<signal.h> which will include <bits/sigcontext.h> with the struct
(this works on all architectures).

Andreas
-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.inka.de
    http://www.suse.de/~aj
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-01-24  7:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-01-24  0:56 sigcontext on Linux-ppc in user space John Kacur
2001-01-24  7:02 ` Andreas Jaeger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox