]>
Commit | Line | Data |
---|---|---|
d3b82fcc | 1 | /* Data structures for user-level context switching. Generic version. |
2b778ceb | 2 | Copyright (C) 1997-2021 Free Software Foundation, Inc. |
f43ce637 UD |
3 | This file is part of the GNU C Library. |
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. | |
f43ce637 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. |
f43ce637 | 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/>. */ |
f43ce637 | 18 | |
d3b82fcc | 19 | /* This file's definitions suffice for any platform where all |
4fa9b3bf JM |
20 | the machine-specific state is described in `struct sigcontext', but |
21 | use of struct sigcontext does not conform to POSIX namespace | |
22 | requirements. */ | |
d3b82fcc | 23 | |
f43ce637 UD |
24 | #ifndef _SYS_UCONTEXT_H |
25 | #define _SYS_UCONTEXT_H 1 | |
26 | ||
d3b82fcc | 27 | #include <features.h> |
d3b82fcc | 28 | |
cfed8ece | 29 | #include <bits/types/sigset_t.h> |
d3b82fcc | 30 | #include <bits/sigcontext.h> |
0bcec532 | 31 | #include <bits/types/stack_t.h> |
c66b29f9 | 32 | |
d3b82fcc RM |
33 | |
34 | typedef struct sigcontext mcontext_t; | |
35 | ||
3d452dab JM |
36 | #ifdef __USE_MISC |
37 | # define __ctx(fld) fld | |
38 | #else | |
39 | # define __ctx(fld) __ ## fld | |
40 | #endif | |
41 | ||
d3b82fcc | 42 | /* Userlevel context. */ |
25128773 | 43 | typedef struct ucontext_t |
d3b82fcc | 44 | { |
3d452dab | 45 | unsigned long int __ctx(uc_flags); |
25128773 | 46 | struct ucontext_t *uc_link; |
d3b82fcc RM |
47 | stack_t uc_stack; |
48 | mcontext_t uc_mcontext; | |
cfed8ece | 49 | sigset_t uc_sigmask; |
d3b82fcc | 50 | } ucontext_t; |
f43ce637 | 51 | |
3d452dab JM |
52 | #undef __ctx |
53 | ||
f43ce637 | 54 | #endif /* sys/ucontext.h */ |