ce426f
commit cfa4df95003c963c16d2102aef9c806f8175f373
ce426f
Author: Marcus Shawcroft <marcus.shawcroft@linaro.org>
ce426f
Date:   Tue Sep 24 12:59:06 2013 +0100
ce426f
ce426f
    [AArch64] Adding sigcontextinfo.h
ce426f
ce426f
diff --git a/ports/sysdeps/unix/sysv/linux/aarch64/sigcontextinfo.h b/ports/sysdeps/unix/sysv/linux/aarch64/sigcontextinfo.h
ce426f
new file mode 100644
ce426f
index 0000000..42ff38e
ce426f
--- /dev/null
ce426f
+++ b/ports/sysdeps/unix/sysv/linux/aarch64/sigcontextinfo.h
ce426f
@@ -0,0 +1,35 @@
ce426f
+/* AArch64 definitions for signal handling calling conventions.
ce426f
+   Copyright (C) 1996-2013 Free Software Foundation, Inc.
ce426f
+   This file is part of the GNU C Library.
ce426f
+
ce426f
+   The GNU C Library is free software; you can redistribute it and/or
ce426f
+   modify it under the terms of the GNU Lesser General Public
ce426f
+   License as published by the Free Software Foundation; either
ce426f
+   version 2.1 of the License, or (at your option) any later version.
ce426f
+
ce426f
+   The GNU C Library is distributed in the hope that it will be useful,
ce426f
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
ce426f
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
ce426f
+   Lesser General Public License for more details.
ce426f
+
ce426f
+   You should have received a copy of the GNU Lesser General Public
ce426f
+   License along with the GNU C Library; if not, see
ce426f
+   <http://www.gnu.org/licenses/>.  */
ce426f
+
ce426f
+#include <sys/ucontext.h>
ce426f
+#include "kernel-features.h"
ce426f
+
ce426f
+#define SIGCONTEXT siginfo_t *_si, struct ucontext *
ce426f
+#define GET_PC(ctx) ((void *) (ctx)->uc_mcontext.pc)
ce426f
+
ce426f
+/* There is no reliable way to get the sigcontext unless we use a
ce426f
+   three-argument signal handler.  */
ce426f
+#define __sigaction(sig, act, oact) ({ \
ce426f
+  (act)->sa_flags |= SA_SIGINFO; \
ce426f
+  (__sigaction) (sig, act, oact); \
ce426f
+})
ce426f
+
ce426f
+#define sigaction(sig, act, oact) ({ \
ce426f
+  (act)->sa_flags |= SA_SIGINFO; \
ce426f
+  (sigaction) (sig, act, oact); \
ce426f
+})