PR c++/3637
[official-gcc.git] / gcc / ada / 5mvxwork.ads
blob2daf08ca22200922c8dde6a3bd0fe296ada9ab23
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 $
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 MIPS 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. MIPS version
69 FP_NUM_DREGS : constant := 16;
70 type Fpx_Array is array (1 .. FP_NUM_DREGS) of IC.double;
72 type FP_CONTEXT is record
73 fpx : Fpx_Array;
74 fpcsr : IC.int;
75 end record;
76 pragma Convention (C, FP_CONTEXT);
78 -- Number of entries in hardware interrupt vector table. Value of
79 -- 0 disables hardware interrupt handling until it can be tested
80 Num_HW_Interrupts : constant := 0;
82 -- VxWorks 5.3 and 5.4 version
83 type TASK_DESC is record
84 td_id : IC.int; -- task id
85 td_name : Address; -- name of task
86 td_priority : IC.int; -- task priority
87 td_status : IC.int; -- task status
88 td_options : IC.int; -- task option bits (see below)
89 td_entry : Address; -- original entry point of task
90 td_sp : Address; -- saved stack pointer
91 td_pStackBase : Address; -- the bottom of the stack
92 td_pStackLimit : Address; -- the effective end of the stack
93 td_pStackEnd : Address; -- the actual end of the stack
94 td_stackSize : IC.int; -- size of stack in bytes
95 td_stackCurrent : IC.int; -- current stack usage in bytes
96 td_stackHigh : IC.int; -- maximum stack usage in bytes
97 td_stackMargin : IC.int; -- current stack margin in bytes
98 td_errorStatus : IC.int; -- most recent task error status
99 td_delay : IC.int; -- delay/timeout ticks
100 end record;
101 pragma Convention (C, TASK_DESC);
103 end System.VxWorks;