]>
git.ipfire.org Git - thirdparty/glibc.git/blob - sysdeps/unix/sysv/linux/mips/sys/ucontext.h
1 /* Copyright (C) 1997-2021 Free Software Foundation, Inc. This file is part of the GNU C Library.
3 The GNU C Library is free software; you can redistribute it and/or
4 modify it under the terms of the GNU Lesser General Public
5 License as published by the Free Software Foundation; either
6 version 2.1 of the License, or (at your option) any later version.
8 The GNU C Library is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 Lesser General Public License for more details.
13 You should have received a copy of the GNU Lesser General Public
14 License along with the GNU C Library. If not, see
15 <https://www.gnu.org/licenses/>. */
17 /* Don't rely on this, the interface is currently messed up and may need to
18 be broken to be fixed. */
19 #ifndef _SYS_UCONTEXT_H
20 #define _SYS_UCONTEXT_H 1
24 #include <bits/types/sigset_t.h>
25 #include <bits/types/stack_t.h>
30 /* Type for general register. Even in o32 we assume 64-bit registers,
32 __extension__
typedef unsigned long long int greg_t
;
34 /* Number of general registers. */
38 # define NGREG __NGREG
39 # define NFPREG __NFPREG
42 /* Container for all general registers. */
43 typedef greg_t gregset_t
[__NGREG
];
46 # define __ctx(fld) fld
48 # define __ctx(fld) __ ## fld
51 /* Container for all FPU registers. */
54 double __ctx(fp_dregs
)[__NFPREG
];
58 } __ctx(fp_fregs
)[__NFPREG
];
63 /* Context to describe whole processor state. */
64 #if _MIPS_SIM == _ABIO32
65 /* Earlier versions of glibc for mips had an entirely different
66 definition of mcontext_t, that didn't even resemble the
67 corresponding kernel data structure. Fortunately, makecontext,
68 [gs]etcontext et all were not implemented back then, so this can
69 still be rectified. */
72 unsigned int __ctx(regmask
);
73 unsigned int __ctx(status
);
75 gregset_t
__ctx(gregs
);
76 fpregset_t
__ctx(fpregs
);
77 unsigned int __ctx(fp_owned
);
78 unsigned int __ctx(fpc_csr
);
79 unsigned int __ctx(fpc_eir
);
80 unsigned int __ctx(used_math
);
81 unsigned int __ctx(dsp
);
84 unsigned long __ctx(hi1
);
85 unsigned long __ctx(lo1
);
86 unsigned long __ctx(hi2
);
87 unsigned long __ctx(lo2
);
88 unsigned long __ctx(hi3
);
89 unsigned long __ctx(lo3
);
94 gregset_t
__ctx(gregs
);
95 fpregset_t
__ctx(fpregs
);
105 unsigned int __ctx(fpc_csr
);
106 unsigned int __ctx(used_math
);
107 unsigned int __ctx(dsp
);
108 unsigned int __glibc_reserved1
;
112 /* Userlevel context. */
113 typedef struct ucontext_t
115 unsigned long int __ctx(uc_flags
);
116 struct ucontext_t
*uc_link
;
118 mcontext_t uc_mcontext
;
124 #endif /* sys/ucontext.h */