]>
Commit | Line | Data |
---|---|---|
04277e02 | 1 | /* Copyright (C) 1998-2019 Free Software Foundation, Inc. |
18a702a8 RH |
2 | This file is part of the GNU C Library. |
3 | ||
4 | The GNU C Library is free software; you can redistribute it and/or | |
3214b89b AJ |
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. | |
18a702a8 RH |
8 | |
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 | |
3214b89b | 12 | Lesser General Public License for more details. |
18a702a8 | 13 | |
3214b89b | 14 | You should have received a copy of the GNU Lesser General Public |
ab84e3ff PE |
15 | License along with the GNU C Library. If not, see |
16 | <http://www.gnu.org/licenses/>. */ | |
18a702a8 RH |
17 | |
18 | #ifndef _SYS_UCONTEXT_H | |
19 | #define _SYS_UCONTEXT_H 1 | |
20 | ||
21 | #include <features.h> | |
18a702a8 | 22 | |
cfed8ece | 23 | #include <bits/types/sigset_t.h> |
0bcec532 | 24 | #include <bits/types/stack_t.h> |
18a702a8 | 25 | |
6e64e12d | 26 | |
4fa9b3bf JM |
27 | #ifdef __USE_MISC |
28 | # define __ctx(fld) fld | |
29 | #else | |
30 | # define __ctx(fld) __ ## fld | |
31 | #endif | |
32 | ||
6e64e12d UD |
33 | /* Type for general register. */ |
34 | typedef long int greg_t; | |
35 | ||
36 | /* Number of general registers. */ | |
139904b7 JM |
37 | #define __NGREG 33 |
38 | #ifdef __USE_MISC | |
39 | # define NGREG __NGREG | |
40 | #endif | |
6e64e12d UD |
41 | |
42 | /* Container for all general registers. */ | |
139904b7 | 43 | typedef greg_t gregset_t[__NGREG]; |
6e64e12d UD |
44 | |
45 | /* Type for floating-point register. */ | |
46 | typedef long int fpreg_t; | |
47 | ||
48 | /* Number of general registers. */ | |
139904b7 JM |
49 | #define __NFPREG 32 |
50 | #ifdef __USE_MISC | |
51 | # define NFPREG __NFPREG | |
52 | #endif | |
6e64e12d UD |
53 | |
54 | /* Container for all general registers. */ | |
139904b7 | 55 | typedef fpreg_t fpregset_t[__NFPREG]; |
6e64e12d UD |
56 | |
57 | ||
18a702a8 | 58 | /* A machine context is exactly a sigcontext. */ |
4fa9b3bf JM |
59 | typedef struct |
60 | { | |
61 | long int __ctx(sc_onstack); | |
62 | long int __ctx(sc_mask); | |
63 | long int __ctx(sc_pc); | |
64 | long int __ctx(sc_ps); | |
65 | long int __ctx(sc_regs)[32]; | |
66 | long int __ctx(sc_ownedfp); | |
67 | long int __ctx(sc_fpregs)[32]; | |
68 | unsigned long int __ctx(sc_fpcr); | |
69 | unsigned long int __ctx(sc_fp_control); | |
70 | unsigned long int __glibc_reserved1, __glibc_reserved2; | |
71 | unsigned long int __ctx(sc_ssize); | |
72 | char *__ctx(sc_sbase); | |
73 | unsigned long int __ctx(sc_traparg_a0); | |
74 | unsigned long int __ctx(sc_traparg_a1); | |
75 | unsigned long int __ctx(sc_traparg_a2); | |
76 | unsigned long int __ctx(sc_fp_trap_pc); | |
77 | unsigned long int __ctx(sc_fp_trigger_sum); | |
78 | unsigned long int __ctx(sc_fp_trigger_inst); | |
79 | } mcontext_t; | |
3d452dab | 80 | |
18a702a8 | 81 | /* Userlevel context. */ |
25128773 | 82 | typedef struct ucontext_t |
18a702a8 | 83 | { |
3d452dab | 84 | unsigned long int __ctx(uc_flags); |
25128773 | 85 | struct ucontext_t *uc_link; |
18a702a8 RH |
86 | unsigned long __uc_osf_sigmask; |
87 | stack_t uc_stack; | |
88 | mcontext_t uc_mcontext; | |
cfed8ece | 89 | sigset_t uc_sigmask; |
18a702a8 RH |
90 | } ucontext_t; |
91 | ||
3d452dab JM |
92 | #undef __ctx |
93 | ||
18a702a8 | 94 | #endif /* sys/ucontext.h */ |