olga / rpms / glibc

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