* c-decl.c (duplicate_decls): Conditionalize DECL_SAVED_TREE copy.
[official-gcc.git] / gcc / ada / 5kvxwork.ads
blob85cbe3d802139d36d97f9e4d0e37a945c2384279
1 ------------------------------------------------------------------------------
2 -- --
3 -- GNU ADA RUN-TIME LIBRARY (GNARL) COMPONENTS --
4 -- --
5 -- S Y S T E M . V X W O R K S --
6 -- --
7 -- S p e c --
8 -- --
9 -- $Revision: 1.2 $
10 -- --
11 -- Copyright (C) 1998-2001 Free Software Foundation --
12 -- --
13 -- GNARL is free software; you can redistribute it and/or modify it under --
14 -- terms of the GNU General Public License as published by the Free Soft- --
15 -- ware Foundation; either version 2, or (at your option) any later ver- --
16 -- sion. GNARL is distributed in the hope that it will be useful, but WITH- --
17 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
18 -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
19 -- for more details. You should have received a copy of the GNU General --
20 -- Public License distributed with GNARL; see file COPYING. If not, write --
21 -- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
22 -- MA 02111-1307, USA. --
23 -- --
24 -- As a special exception, if other files instantiate generics from this --
25 -- unit, or you link this unit with other files to produce an executable, --
26 -- this unit does not by itself cause the resulting executable to be --
27 -- covered by the GNU General Public License. This exception does not --
28 -- however invalidate any other reasons why the executable file might be --
29 -- covered by the GNU Public License. --
30 -- --
31 -- GNARL was developed by the GNARL team at Florida State University. It is --
32 -- now maintained by Ada Core Technologies Inc. in cooperation with Florida --
33 -- State University (http://www.gnat.com). --
34 -- --
35 ------------------------------------------------------------------------------
37 -- This is the M68K VxWorks version of this package.
39 with Interfaces.C;
41 package System.VxWorks is
42 pragma Preelaborate (System.VxWorks);
44 package IC renames Interfaces.C;
46 -- Define enough of a Wind Task Control Block in order to
47 -- obtain the inherited priority. When porting this to
48 -- different versions of VxWorks (this is based on 5.3[.1]),
49 -- be sure to look at the definition for WIND_TCB located
50 -- in $WIND_BASE/target/h/taskLib.h
52 type Wind_Fill_1 is array (0 .. 16#3F#) of IC.unsigned_char;
53 type Wind_Fill_2 is array (16#48# .. 16#107#) of IC.unsigned_char;
55 type Wind_TCB is record
56 Fill_1 : Wind_Fill_1; -- 0x00 - 0x3f
57 Priority : IC.int; -- 0x40 - 0x43, current (inherited) priority
58 Normal_Priority : IC.int; -- 0x44 - 0x47, base priority
59 Fill_2 : Wind_Fill_2; -- 0x48 - 0x107
60 spare1 : Address; -- 0x108 - 0x10b
61 spare2 : Address; -- 0x10c - 0x10f
62 spare3 : Address; -- 0x110 - 0x113
63 spare4 : Address; -- 0x114 - 0x117
64 end record;
65 type Wind_TCB_Ptr is access Wind_TCB;
67 -- Floating point context record. 68K version
69 FP_NUM_DREGS : constant := 8;
70 FP_STATE_FRAME_SIZE : constant := 216;
72 type DOUBLEX is array (1 .. 12) of Interfaces.Unsigned_8;
73 pragma Pack (DOUBLEX);
74 for DOUBLEX'Size use 12 * 8;
76 type DOUBLEX_Array is array (1 .. FP_NUM_DREGS) of DOUBLEX;
77 pragma Pack (DOUBLEX_Array);
78 for DOUBLEX_Array'Size use FP_NUM_DREGS * 12 * 8;
80 type FPREG_SET is record
81 fpcr : IC.int;
82 fpsr : IC.int;
83 fpiar : IC.int;
84 fpx : DOUBLEX_Array;
85 end record;
87 type Fp_State_Frame_Array is array (1 .. FP_STATE_FRAME_SIZE) of IC.char;
88 pragma Pack (Fp_State_Frame_Array);
89 for Fp_State_Frame_Array'Size use 8 * FP_STATE_FRAME_SIZE;
91 type FP_CONTEXT is record
92 fpRegSet : FPREG_SET;
93 stateFrame : Fp_State_Frame_Array;
94 end record;
95 pragma Convention (C, FP_CONTEXT);
97 Num_HW_Interrupts : constant := 256;
98 -- Number of entries in the hardware interrupt vector table
100 -- VxWorks 5.3 and 5.4 version
101 type TASK_DESC is record
102 td_id : IC.int; -- task id
103 td_name : Address; -- name of task
104 td_priority : IC.int; -- task priority
105 td_status : IC.int; -- task status
106 td_options : IC.int; -- task option bits (see below)
107 td_entry : Address; -- original entry point of task
108 td_sp : Address; -- saved stack pointer
109 td_pStackBase : Address; -- the bottom of the stack
110 td_pStackLimit : Address; -- the effective end of the stack
111 td_pStackEnd : Address; -- the actual end of the stack
112 td_stackSize : IC.int; -- size of stack in bytes
113 td_stackCurrent : IC.int; -- current stack usage in bytes
114 td_stackHigh : IC.int; -- maximum stack usage in bytes
115 td_stackMargin : IC.int; -- current stack margin in bytes
116 td_errorStatus : IC.int; -- most recent task error status
117 td_delay : IC.int; -- delay/timeout ticks
118 end record;
119 pragma Convention (C, TASK_DESC);
121 end System.VxWorks;