2006-01-10 Roland McGrath <roland@redhat.com>
[glibc-ports.git] / sysdeps / am33 / sys / ucontext.h
blob7995aae42f94e481b4c07ff225ce10f4acbd5a37
1 /* Copyright 1997, 1999, 2000, 2002 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 Library General Public License as
6 published by the Free Software Foundation; either version 2 of the
7 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 Library General Public License for more details.
14 You should have received a copy of the GNU Library General Public
15 License along with the GNU C Library; see the file COPYING.LIB. If not,
16 write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 Boston, MA 02111-1307, USA. */
19 /* AM33/2.0 context switching support. */
21 #ifndef _SYS_UCONTEXT_H
22 #define _SYS_UCONTEXT_H 1
24 #include <features.h>
25 #include <signal.h>
27 /* Type for general register. */
28 typedef int greg_t;
30 /* Number of general registers. */
31 #define NGREG 28
33 /* Container for all general registers. */
34 typedef greg_t gregset_t[NGREG];
36 /* Number of each register is the `gregset_t' array. */
37 enum
39 REG_D0 = 0,
40 #define REG_D0 REG_D0
41 REG_D1,
42 #define REG_D1 REG_D1
43 REG_D2,
44 #define REG_D2 REG_D2
45 REG_D3,
46 #define REG_D3 REG_D3
47 REG_A0,
48 #define REG_A0 REG_A0
49 REG_A1,
50 #define REG_A1 REG_A1
51 REG_A2,
52 #define REG_A2 REG_A2
53 REG_A3,
54 #define REG_A3 REG_A3
55 REG_E0,
56 #define REG_E0 REG_E0
57 REG_E1,
58 #define REG_E1 REG_E1
59 REG_E2,
60 #define REG_E2 REG_E2
61 REG_E3,
62 #define REG_E3 REG_E3
63 REG_E4,
64 #define REG_E4 REG_E4
65 REG_E5,
66 #define REG_E5 REG_E5
67 REG_E6,
68 #define REG_E6 REG_E6
69 REG_E7,
70 #define REG_E7 REG_E7
71 REG_LAR,
72 #define REG_LAR REG_LAR
73 REG_LIR,
74 #define REG_LIR REG_LIR
75 REG_MDR,
76 #define REG_MDR REG_MDR
77 REG_MCVF,
78 #define REG_MCVF REG_MCVF
79 REG_MCRL,
80 #define REG_MCRL REG_MCRL
81 REG_MCRH,
82 #define REG_MCRH REG_MCRH
83 REG_MDRQ,
84 #define REG_MDRQ REG_MDRQ
85 REG_SP,
86 #define REG_SP REG_SP
87 REG_EPSW,
88 #define REG_EPSW REG_EPSW
89 REG_PC,
90 #define REG_PC REG_PC
93 typedef int freg_t;
95 /* Structure to describe FPU registers. */
96 typedef struct {
97 union {
98 double fp_dregs[16];
99 float fp_fregs[32];
100 freg_t fp_regs[32];
101 } regs;
102 freg_t fpcr;
103 } fpregset_t;
105 /* Context to describe whole processor state. */
106 typedef struct
108 gregset_t gregs;
109 fpregset_t fpregs;
110 } mcontext_t;
112 /* Userlevel context. */
113 typedef struct ucontext
115 unsigned long int uc_flags;
116 struct ucontext *uc_link;
117 __sigset_t uc_sigmask;
118 stack_t uc_stack;
119 mcontext_t uc_mcontext;
120 long int uc_filler[5];
121 } ucontext_t;
123 #endif /* sys/ucontext.h */