1 ------------------------------------------------------------------------------
3 -- GNU ADA RUN-TIME LIBRARY (GNARL) COMPONENTS --
5 -- S Y S T E M . V X W O R K S --
11 -- Copyright (C) 1998-2001 Free Software Foundation --
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. --
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. --
31 -- GNARL was developed by the GNARL team at Florida State University. --
32 -- Extensive contributions were provided by Ada Core Technologies Inc. --
34 ------------------------------------------------------------------------------
36 -- This is the MIPS VxWorks version of this package.
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
64 type Wind_TCB_Ptr
is access Wind_TCB
;
66 -- Floating point context record. MIPS version
68 FP_NUM_DREGS
: constant := 16;
69 type Fpx_Array
is array (1 .. FP_NUM_DREGS
) of IC
.double
;
71 type FP_CONTEXT
is record
75 pragma Convention
(C
, FP_CONTEXT
);
77 -- Number of entries in hardware interrupt vector table. Value of
78 -- 0 disables hardware interrupt handling until it can be tested
79 Num_HW_Interrupts
: constant := 0;
81 -- VxWorks 5.3 and 5.4 version
82 type TASK_DESC
is record
83 td_id
: IC
.int
; -- task id
84 td_name
: Address
; -- name of task
85 td_priority
: IC
.int
; -- task priority
86 td_status
: IC
.int
; -- task status
87 td_options
: IC
.int
; -- task option bits (see below)
88 td_entry
: Address
; -- original entry point of task
89 td_sp
: Address
; -- saved stack pointer
90 td_pStackBase
: Address
; -- the bottom of the stack
91 td_pStackLimit
: Address
; -- the effective end of the stack
92 td_pStackEnd
: Address
; -- the actual end of the stack
93 td_stackSize
: IC
.int
; -- size of stack in bytes
94 td_stackCurrent
: IC
.int
; -- current stack usage in bytes
95 td_stackHigh
: IC
.int
; -- maximum stack usage in bytes
96 td_stackMargin
: IC
.int
; -- current stack margin in bytes
97 td_errorStatus
: IC
.int
; -- most recent task error status
98 td_delay
: IC
.int
; -- delay/timeout ticks
100 pragma Convention
(C
, TASK_DESC
);