summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/mips/bits/sigcontextinfo.h
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2006-08-23 19:27:42 +0000
committerMike Frysinger <vapier@gentoo.org>2006-08-23 19:27:42 +0000
commit0814bdad52c764ec4f3c010e78d7cdb6418e64e0 (patch)
tree3c706ff1cb2cce2cbc9eb500095745b974e3e4b9 /libc/sysdeps/linux/mips/bits/sigcontextinfo.h
parente47414d975e0ba1fe3a5f329756a20daaf31fefa (diff)
sync with upstream via psm
Diffstat (limited to 'libc/sysdeps/linux/mips/bits/sigcontextinfo.h')
-rw-r--r--libc/sysdeps/linux/mips/bits/sigcontextinfo.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/libc/sysdeps/linux/mips/bits/sigcontextinfo.h b/libc/sysdeps/linux/mips/bits/sigcontextinfo.h
index a51c6f043..f453c8d9b 100644
--- a/libc/sysdeps/linux/mips/bits/sigcontextinfo.h
+++ b/libc/sysdeps/linux/mips/bits/sigcontextinfo.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2001, 2003, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Jaeger <aj@suse.de>, 2000.
@@ -18,6 +18,10 @@
02111-1307 USA. */
+#include <sgidefs.h>
+
+#if _MIPS_SIM == _ABIO32
+
#define SIGCONTEXT unsigned long _code, struct sigcontext *
#define SIGCONTEXT_EXTRA_ARGS _code,
#define GET_PC(ctx) ((void *) ctx->sc_pc)
@@ -25,3 +29,15 @@
#define GET_STACK(ctx) ((void *) ctx->sc_regs[29])
#define CALL_SIGHANDLER(handler, signo, ctx) \
(handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx))
+
+#else
+
+#define SIGCONTEXT unsigned long _code, ucontext_t *
+#define SIGCONTEXT_EXTRA_ARGS _code,
+#define GET_PC(ctx) ((void *) ctx->uc_mcontext.pc)
+#define GET_FRAME(ctx) ((void *) ctx->uc_mcontext.gregs[30])
+#define GET_STACK(ctx) ((void *) ctx->uc_mcontext.gregs[29])
+#define CALL_SIGHANDLER(handler, signo, ctx) \
+ (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx))
+
+#endif