Update copyright dates with scripts/update-copyrights
[glibc.git] / sysdeps / unix / sysv / linux / sparc / sparc64 / sigcontextinfo.h
blobc2bdb082a68619a3ee952f871cdb4164cbfdbb55
1 /* Copyright (C) 1999-2023 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, see
16 <https://www.gnu.org/licenses/>. */
18 #ifndef _SIGCONTEXTINFO_H
19 #define _SIGCONTEXTINFO_H
21 #include <bits/types/siginfo_t.h>
23 /* The sparc64 kernel signal frame for SA_SIGINFO is defined as:
25 struct rt_signal_frame
27 struct sparc_stackf ss;
28 siginfo_t info;
29 struct pt_regs regs;
30 __siginfo_fpu_t *fpu_save;
31 stack_t stack;
32 sigset_t mask;
33 __siginfo_rwin_t *rwin_save;
36 Unlike other architectures, sparc64 passe the siginfo_t INFO pointer
37 as the third argument to a sa_sigaction handler with SA_SIGINFO enabled. */
39 #ifndef STACK_BIAS
40 #define STACK_BIAS 2047
41 #endif
43 struct pt_regs
45 unsigned long int u_regs[16];
46 unsigned long int tstate;
47 unsigned long int tpc;
48 unsigned long int tnpc;
49 unsigned int y;
50 unsigned int magic;
53 static inline uintptr_t
54 sigcontext_get_pc (const siginfo_t *ctx)
56 struct pt_regs *regs = (struct pt_regs*) ((siginfo_t *)(ctx) + 1);
57 return regs->tpc;
60 #endif