]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/uclibc/lib/contrib/uclibc/libc/sysdeps/linux/avr32/sys/ucontext.h
update
[l4.git] / l4 / pkg / uclibc / lib / contrib / uclibc / libc / sysdeps / linux / avr32 / sys / ucontext.h
1 /* Copyright (C) 1998, 1999, 2001 Free Software Foundation, Inc.
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
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.
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
12    Lesser General Public License for more details.
13
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    <http://www.gnu.org/licenses/>.  */
17
18 /* Linux/AVR32 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 #include <sys/procfs.h>
26 #include <bits/sigcontext.h>
27
28 typedef int greg_t;
29
30 /* Number of general registers.  */
31 #define NGREG   16
32
33 /* Container for all general registers.  */
34 typedef elf_gregset_t gregset_t;
35
36 /* Number of each register is the `gregset_t' array.  */
37 enum
38 {
39   R0 = 0,
40 #define R0      R0
41   R1 = 1,
42 #define R1      R1
43   R2 = 2,
44 #define R2      R2
45   R3 = 3,
46 #define R3      R3
47   R4 = 4,
48 #define R4      R4
49   R5 = 5,
50 #define R5      R5
51   R6 = 6,
52 #define R6      R6
53   R7 = 7,
54 #define R7      R7
55   R8 = 8,
56 #define R8      R8
57   R9 = 9,
58 #define R9      R9
59   R10 = 10,
60 #define R10     R10
61   R11 = 11,
62 #define R11     R11
63   R12 = 12,
64 #define R12     R12
65   R13 = 13,
66 #define R13     R13
67   R14 = 14,
68 #define R14     R14
69   R15 = 15
70 #define R15     R15
71 };
72
73 /* Structure to describe FPU registers.  */
74 typedef elf_fpregset_t  fpregset_t;
75
76 /* Context to describe whole processor state.  */
77 typedef struct sigcontext mcontext_t;
78
79 /* Userlevel context.  */
80 typedef struct ucontext
81 {
82         unsigned long   uc_flags;
83         struct ucontext *uc_link;
84         stack_t         uc_stack;
85         mcontext_t      uc_mcontext;
86         sigset_t        uc_sigmask;   /* mask last for extensibility */
87 } ucontext_t;
88
89 #endif /* sys/ucontext.h */