Daily bump.
[official-gcc.git] / gcc / ada / 5svxwork.ads
blob2ffe84a31d4a6402f64878229664c44e6879a400
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.1.16.1 $
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. --
32 -- Extensive contributions were provided by Ada Core Technologies Inc. --
33 -- --
34 ------------------------------------------------------------------------------
36 -- This is the SPARC64 VxWorks version of this package.
38 with Interfaces.C;
40 package System.VxWorks is
41 pragma Preelaborate (System.VxWorks);
43 package IC renames Interfaces.C;
45 -- Define enough of a Wind Task Control Block in order to
46 -- obtain the inherited priority. When porting this to
47 -- different versions of VxWorks (this is based on 5.3[.1]),
48 -- be sure to look at the definition for WIND_TCB located
49 -- in $WIND_BASE/target/h/taskLib.h
51 type Wind_Fill_1 is array (0 .. 16#3F#) of IC.unsigned_char;
52 type Wind_Fill_2 is array (16#48# .. 16#107#) of IC.unsigned_char;
54 type Wind_TCB is record
55 Fill_1 : Wind_Fill_1; -- 0x00 - 0x3f
56 Priority : IC.int; -- 0x40 - 0x43, current (inherited) priority
57 Normal_Priority : IC.int; -- 0x44 - 0x47, base priority
58 Fill_2 : Wind_Fill_2; -- 0x48 - 0x107
59 spare1 : Address; -- 0x108 - 0x10b
60 spare2 : Address; -- 0x10c - 0x10f
61 spare3 : Address; -- 0x110 - 0x113
62 spare4 : Address; -- 0x114 - 0x117
63 end record;
64 type Wind_TCB_Ptr is access Wind_TCB;
66 -- Floating point context record. SPARCV9 version
68 FP_NUM_DREGS : constant := 32;
70 type RType is new Interfaces.Unsigned_64;
71 for RType'Alignment use 8;
73 type Fpd_Array is array (1 .. FP_NUM_DREGS) of RType;
74 for Fpd_Array'Alignment use 8;
76 type FP_CONTEXT is record
77 fpd : Fpd_Array;
78 fsr : RType;
79 end record;
81 for FP_CONTEXT'Alignment use 8;
82 pragma Convention (C, FP_CONTEXT);
84 -- Number of entries in hardware interrupt vector table. Value of
85 -- 0 disables hardware interrupt handling until we have time to test it
86 -- on this target.
87 Num_HW_Interrupts : constant := 0;
89 -- VxWorks 5.3 and 5.4 version
90 type TASK_DESC is record
91 td_id : IC.int; -- task id
92 td_name : Address; -- name of task
93 td_priority : IC.int; -- task priority
94 td_status : IC.int; -- task status
95 td_options : IC.int; -- task option bits (see below)
96 td_entry : Address; -- original entry point of task
97 td_sp : Address; -- saved stack pointer
98 td_pStackBase : Address; -- the bottom of the stack
99 td_pStackLimit : Address; -- the effective end of the stack
100 td_pStackEnd : Address; -- the actual end of the stack
101 td_stackSize : IC.int; -- size of stack in bytes
102 td_stackCurrent : IC.int; -- current stack usage in bytes
103 td_stackHigh : IC.int; -- maximum stack usage in bytes
104 td_stackMargin : IC.int; -- current stack margin in bytes
105 td_errorStatus : IC.int; -- most recent task error status
106 td_delay : IC.int; -- delay/timeout ticks
107 end record;
108 pragma Convention (C, TASK_DESC);
110 end System.VxWorks;