]> git.ipfire.org Git - thirdparty/glibc.git/blame - sysdeps/unix/sysv/linux/sparc/sparc64/sigcontextinfo.h
Prefer https to http for gnu.org and fsf.org URLs
[thirdparty/glibc.git] / sysdeps / unix / sysv / linux / sparc / sparc64 / sigcontextinfo.h
CommitLineData
04277e02 1/* Copyright (C) 1999-2019 Free Software Foundation, Inc.
84514bcb
UD
2 This file is part of the GNU C Library.
3 Contributed by Jakub Jelinek <jj@ultra.linux.cz>, 1999.
4
5 The GNU C Library is free software; you can redistribute it and/or
41bdb6e2
AJ
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
84514bcb
UD
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
41bdb6e2 13 Lesser General Public License for more details.
84514bcb 14
41bdb6e2 15 You should have received a copy of the GNU Lesser General Public
59ba27a6 16 License along with the GNU C Library; if not, see
5a82c748 17 <https://www.gnu.org/licenses/>. */
84514bcb 18
a43565ac
AZ
19#ifndef _SIGCONTEXTINFO_H
20#define _SIGCONTEXTINFO_H
21
22#include <bits/types/siginfo_t.h>
23
24/* The sparc64 kernel signal frame for SA_SIGINFO is defined as:
25
26 struct rt_signal_frame
27 {
28 struct sparc_stackf ss;
29 siginfo_t info;
30 struct pt_regs regs;
31 __siginfo_fpu_t *fpu_save;
32 stack_t stack;
33 sigset_t mask;
34 __siginfo_rwin_t *rwin_save;
35 };
36
37 Unlike other architectures, sparc64 passe the siginfo_t INFO pointer
38 as the third argument to a sa_sigaction handler with SA_SIGINFO enabled. */
39
e1f601e8
UD
40#ifndef STACK_BIAS
41#define STACK_BIAS 2047
28fd0f23 42#endif
a43565ac
AZ
43
44struct pt_regs
45{
46 unsigned long int u_regs[16];
47 unsigned long int tstate;
48 unsigned long int tpc;
49 unsigned long int tnpc;
50 unsigned int y;
51 unsigned int magic;
52};
53
54static inline uintptr_t
55sigcontext_get_pc (const siginfo_t *ctx)
56{
57 struct pt_regs *regs = (struct pt_regs*) ((siginfo_t *)(ctx) + 1);
58 return regs->tpc;
59}
60
61#endif