]>
Commit | Line | Data |
---|---|---|
bfff8b1b | 1 | /* Copyright (C) 1998-2017 Free Software Foundation, Inc. |
028502bf UD |
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. | |
028502bf UD |
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. |
028502bf | 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/>. */ | |
028502bf UD |
17 | |
18 | /* System V/ARM ABI compliant context switching support. */ | |
19 | ||
20 | #ifndef _SYS_UCONTEXT_H | |
21 | #define _SYS_UCONTEXT_H 1 | |
22 | ||
23 | #include <features.h> | |
24 | #include <signal.h> | |
25 | ||
c66b29f9 ZW |
26 | /* We need the signal context definitions even if they are not exposed |
27 | by <signal.h>. */ | |
a992f506 | 28 | #include <bits/types/__sigset_t.h> |
c66b29f9 ZW |
29 | #include <bits/sigcontext.h> |
30 | #include <bits/sigstack.h> | |
0bcec532 JM |
31 | #include <bits/types/struct_sigstack.h> |
32 | #include <bits/types/stack_t.h> | |
33 | #include <bits/ss_flags.h> | |
c66b29f9 ZW |
34 | |
35 | ||
028502bf UD |
36 | typedef int greg_t; |
37 | ||
38 | /* Number of general registers. */ | |
39 | #define NGREG 16 | |
40 | ||
41 | /* Container for all general registers. */ | |
42 | typedef greg_t gregset_t[NGREG]; | |
43 | ||
5df4854e | 44 | #ifdef __USE_MISC |
028502bf UD |
45 | /* Number of each register is the `gregset_t' array. */ |
46 | enum | |
47 | { | |
48 | R0 = 0, | |
5df4854e | 49 | # define R0 R0 |
028502bf | 50 | R1 = 1, |
5df4854e | 51 | # define R1 R1 |
028502bf | 52 | R2 = 2, |
5df4854e | 53 | # define R2 R2 |
028502bf | 54 | R3 = 3, |
5df4854e | 55 | # define R3 R3 |
028502bf | 56 | R4 = 4, |
5df4854e | 57 | # define R4 R4 |
028502bf | 58 | R5 = 5, |
5df4854e | 59 | # define R5 R5 |
028502bf | 60 | R6 = 6, |
5df4854e | 61 | # define R6 R6 |
028502bf | 62 | R7 = 7, |
5df4854e | 63 | # define R7 R7 |
028502bf | 64 | R8 = 8, |
5df4854e | 65 | # define R8 R8 |
028502bf | 66 | R9 = 9, |
5df4854e | 67 | # define R9 R9 |
028502bf | 68 | R10 = 10, |
5df4854e | 69 | # define R10 R10 |
028502bf | 70 | R11 = 11, |
5df4854e | 71 | # define R11 R11 |
028502bf | 72 | R12 = 12, |
5df4854e | 73 | # define R12 R12 |
028502bf | 74 | R13 = 13, |
5df4854e | 75 | # define R13 R13 |
028502bf | 76 | R14 = 14, |
5df4854e | 77 | # define R14 R14 |
028502bf | 78 | R15 = 15, |
5df4854e | 79 | # define R15 R15 |
028502bf | 80 | }; |
5df4854e | 81 | #endif |
028502bf UD |
82 | |
83 | /* Structure to describe FPU registers. */ | |
84 | typedef struct fpregset | |
85 | { | |
86 | } fpregset_t; | |
87 | ||
88 | /* Context to describe whole processor state. */ | |
89 | typedef struct | |
90 | { | |
91 | gregset_t gregs; | |
92 | fpregset_t fpregs; | |
93 | } mcontext_t; | |
94 | ||
95 | /* Userlevel context. */ | |
96 | typedef struct ucontext | |
97 | { | |
98 | unsigned long int uc_flags; | |
df019d94 | 99 | struct ucontext *uc_link; |
028502bf UD |
100 | __sigset_t uc_sigmask; |
101 | stack_t uc_stack; | |
102 | mcontext_t uc_mcontext; | |
103 | long int uc_filler[5]; | |
104 | } ucontext_t; | |
105 | ||
106 | #endif /* sys/ucontext.h */ |