resolv: Make _res_opcodes a compat symbol [BZ #31764]
[glibc.git] / sysdeps / unix / sysv / linux / hppa / sys / ucontext.h
blob7c6ddb804d5a2a47e7fdc3f99aefdc7e7053f64d
1 /* Copyright (C) 1997-2024 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 /* Don't rely on this, the interface is currently messed up and may need to
19 be broken to be fixed. */
20 #ifndef _SYS_UCONTEXT_H
21 #define _SYS_UCONTEXT_H 1
23 #include <features.h>
25 #include <bits/types/sigset_t.h>
26 #include <bits/types/stack_t.h>
29 #ifdef __USE_MISC
30 # define __ctx(fld) fld
31 #else
32 # define __ctx(fld) __ ## fld
33 #endif
35 #ifdef __USE_MISC
36 /* Type for general register. */
37 typedef unsigned long int greg_t;
39 /* Number of general registers. */
40 # define NGREG 80
41 # define NFPREG 32
43 /* Container for all general registers. */
44 typedef struct gregset
46 greg_t g_regs[32];
47 greg_t sr_regs[8];
48 greg_t cr_regs[24];
49 greg_t g_pad[16];
50 } gregset_t;
52 /* Container for all FPU registers. */
53 typedef struct
55 double fp_dregs[32];
56 } fpregset_t;
57 #endif
59 /* Context to describe whole processor state. */
60 typedef struct
62 unsigned long int __ctx(sc_flags);
63 unsigned long int __ctx(sc_gr)[32];
64 unsigned long long int __ctx(sc_fr)[32];
65 unsigned long int __ctx(sc_iasq)[2];
66 unsigned long int __ctx(sc_iaoq)[2];
67 unsigned long int __ctx(sc_sar);
68 } mcontext_t;
70 /* Userlevel context. */
71 typedef struct ucontext_t
73 unsigned long int __ctx(uc_flags);
74 struct ucontext_t *uc_link;
75 stack_t uc_stack;
76 mcontext_t uc_mcontext;
77 sigset_t uc_sigmask;
78 } ucontext_t;
80 #undef __ctx
82 #endif /* sys/ucontext.h */