|
|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 13312 (0x3400)
Types: Ada Source
Notes: 03_class, FILE, R1k_Segment, e3_tag, package V_I_Pass, seg_04ce10
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦5a81ac88f⟧ »Space Info Vol 1«
└─⟦this⟧
-- Copyright 1988,1992,1993 Verdix Corporation
------------------------------------------------------------------------------
-- Interface to the passive task data structure and subprograms.
--
-- The compiler emits calls to these subprograms when
-- "pragma passive" is present in task specification.
--
-- The compiler does an implicit "with v_i_pass" while compiling
-- units that declare passive tasks. The compiler knows the
-- names and the basic data types of most of the objects declared
-- in this package.
------------------------------------------------------------------------------
with System;
use System;
with Ada_Krn_Defs;
with V_I_Mutex;
with Unchecked_Conversion;
-- CIFO_SYNCHRONIZATION or PRIORITY_CEILING
with V_I_Cifo;
-- CIFO_SYNCHRONIZATION or PRIORITY_CEILING
package V_I_Pass is
pragma Suppress (All_Checks);
pragma Suppress (Exception_Tables);
pragma Not_Elaborated;
pragma Local_Access;
--------------------------------------------------------------------------
-- Passive task header record, allocated and built by the
-- compiler, one for each passive task object. The entry
-- and guard arrays are not really 1..8, but we want them
-- to be constrained.
--------------------------------------------------------------------------
type Entry_Array is array (Integer range 1 .. 8) of Integer;
type A_Entrys is access Entry_Array;
type Guard_Array is array (Integer range 1 .. 8) of Boolean;
type A_Guards is access Guard_Array;
type Task_Header;
type Task_Header_Ref is access Task_Header;
type Task_Header is
record
State : Integer;
Alloc_Base : Address;
Guard_Ptr : A_Guards;
Entry_Ptr : A_Entrys;
Abort_Safe : Boolean;
Entered_From_Isr : Boolean;
Callable_From_Isr : Boolean;
Active_Passive_Link : Task_Header_Ref;
-- CIFO_SYNCHRONIZATION
Entry_Criteria : V_I_Cifo.Queuing_T;
-- CIFO_SYNCHRONIZATION
-- PRIORITY_CEILING
Ceiling_Prio : Integer;
-- PRIORITY_CEILING
Attr : Ada_Krn_Defs.A_Mutex_Attr_T;
Safe_Cond : V_I_Mutex.Safe_Cond_T;
Safe_Mutex : V_I_Mutex.Safe_Mutex_T;
end record;
function To_Task_Header_Ref is
new Unchecked_Conversion (Address, Task_Header_Ref);
--------------------------------------------------------------------------
-- The three different kinds of entry calls.
--------------------------------------------------------------------------
Pt_Entry_Call : constant Integer := 1;
Pt_Cond_Call : constant Integer := 2;
Pt_Timed_Call : constant Integer := 3;
--------------------------------------------------------------------------
-- Parameter block passed to passive task accept bodies and the
-- compiler generated utility routines called by the accept bodies.
-- A pointer to this block is passed in the target's RESULT register.
--------------------------------------------------------------------------
type Param_Block is
record
Header : Task_Header_Ref;
Kind_Of_Call : Integer;
Delay_Value : Duration;
end record;
type A_Param_Block is access Param_Block;
-- These constants are used in v_usr_conf to allow the machine
-- code routine V_PASSIVE_ISR to reference param_block fields.
-- The rep spec below is included to allow the compiler to check
-- that the offsets are correct and/or reasonable.
Pt_Pb_Header_Off : constant := 0;
Pt_Pb_Kind_Off : constant := 4;
Pt_Pb_Delay_Off : constant := 8;
for Param_Block use
record
Header at Pt_Pb_Header_Off range 0 .. 31;
Kind_Of_Call at Pt_Pb_Kind_Off range 0 .. 31;
Delay_Value at Pt_Pb_Delay_Off range 0 .. 31;
end record;
--------------------------------------------------------------------------
-- Interrupt entry's ISR header record built by the compiler
--------------------------------------------------------------------------
type Isr_Header is
record
Vector_Num : Integer;
Entry_Num : Integer;
Param_Block : A_Param_Block;
Finish_Accept_A : Address;
end record;
-- These constants are used in v_usr_conf to allow the machine
-- code routine V_PASSIVE_ISR to reference the isr header.
-- The rep spec below is included to allow the compiler to check
-- that the offsets are correct and/or reasonable.
Pt_Isr_Vector_Num_Off : constant := 0;
Pt_Isr_Entry_Num_Off : constant := 4;
Pt_Isr_Param_Block_Off : constant := 8;
Pt_Isr_Finish_Accept_A_Off : constant := 12;
for Isr_Header use
record
Vector_Num at Pt_Isr_Vector_Num_Off range 0 .. 31;
Entry_Num at Pt_Isr_Entry_Num_Off range 0 .. 31;
Param_Block at Pt_Isr_Param_Block_Off range 0 .. 31;
Finish_Accept_A at Pt_Isr_Finish_Accept_A_Off range 0 .. 31;
end record;
type Isr_Header_Ref is access Isr_Header;
--------------------------------------------------------------------------
-- Subprograms to call/enter a passive task's entry
--------------------------------------------------------------------------
function Pt_Enter (Entry_Num : Integer; T : Task_Header_Ref) return Boolean;
function Pt_Safe_Enter
(Entry_Num : Integer; T : Task_Header_Ref) return Boolean;
function Pt_Cond_Enter
(Entry_Num : Integer; T : Task_Header_Ref) return Boolean;
function Pt_Safe_Cond_Enter
(Entry_Num : Integer; T : Task_Header_Ref) return Boolean;
function Pt_Timed_Enter
(Timeout : Duration; Entry_Num : Integer; T : Task_Header_Ref)
return Boolean;
function Pt_Safe_Timed_Enter
(Timeout : Duration; Entry_Num : Integer; T : Task_Header_Ref)
return Boolean;
--------------------------------------------------------------------------
-- Subprogam to call/enter a passive task's entry from an ISR
--------------------------------------------------------------------------
procedure Pt_Isr_Enter (T : Task_Header_Ref);
--------------------------------------------------------------------------
-- Subprogram to leave a passive task
--------------------------------------------------------------------------
procedure Pt_Leave (T : Task_Header_Ref);
procedure Pt_Safe_Leave (T : Task_Header_Ref);
--------------------------------------------------------------------------
-- Subprogram to initialize a passive task
--------------------------------------------------------------------------
procedure Pt_Init (T : Task_Header_Ref);
--------------------------------------------------------------------------
-- Abort a passive task by setting it's state to TERMINATED.
--------------------------------------------------------------------------
procedure Pt_Abort (T : Task_Header_Ref);
--------------------------------------------------------------------------
-- The E'count attribute for passive tasks.
--------------------------------------------------------------------------
function Pt_Count (Entry_Num : Integer; T : Task_Header_Ref) return Integer;
--------------------------------------------------------------------------
-- Routines to elaborate passive tasks. Tasks are added to the
-- activation list by pt_link and elaborated _en masse_ by pt_elab_list.
--------------------------------------------------------------------------
procedure Pt_Link (Activ_List : System.Address;
T : Task_Header_Ref;
Proc_Addr : System.Address;
Flag_Addr : System.Address;
Generic_Env : System.Address);
procedure Pt_Elab_List (Activ_List : System.Address);
-- PRIORITY_CEILING
--------------------------------------------------------------------------
-- Priority ceiling server task subprograms
--
-- Only supported as part of the CIFO add-on product. These routines
-- support the INITIAL_TASK_PRIORITY_CEILING pragma. Also support
-- the routines, SET_PRIORITY_CEILING and PRIORITY_CEILING_OF
-- found in the DYNAMIC_TASK_PRIORITY_CEILINGS package.
--------------------------------------------------------------------------
procedure Pt_Ceiling_Init (T : Task_Header_Ref; Ceiling_Prio : Priority);
function Pt_Ceiling_Enter
(Entry_Num : Integer; T : Task_Header_Ref) return Boolean;
procedure Pt_Ceiling_Leave (T : Task_Header_Ref);
procedure Pt_Ceiling_Set_Priority
(T : Task_Header_Ref; Ceiling_Prio : Priority);
function Pt_Ceiling_Get_Priority (T : Task_Header_Ref) return Priority;
-- Either routine will raise v_i_cifo.PRIORITY_CEILING_ERROR if the
-- passive task isn't a priority ceiling server.
-- PRIORITY_CEILING
private
pragma Interface (Ada, Pt_Enter);
pragma Interface_Name (Pt_Enter, "PT_ENTER");
pragma Interface (Ada, Pt_Safe_Enter);
pragma Interface_Name (Pt_Safe_Enter, "PT_SAFE_ENTER");
pragma Interface (Ada, Pt_Cond_Enter);
pragma Interface_Name (Pt_Cond_Enter, "PT_COND_ENTER");
pragma Interface (Ada, Pt_Safe_Cond_Enter);
pragma Interface_Name (Pt_Safe_Cond_Enter, "PT_SAFE_COND_ENTER");
pragma Interface (Ada, Pt_Timed_Enter);
pragma Interface_Name (Pt_Timed_Enter, "PT_TIMED_ENTER");
pragma Interface (Ada, Pt_Safe_Timed_Enter);
pragma Interface_Name (Pt_Safe_Timed_Enter, "PT_SAFE_TIMED_ENTER");
pragma Interface (Ada, Pt_Isr_Enter);
pragma Interface_Name (Pt_Isr_Enter, "PT_ISR_ENTER");
pragma Interface (Ada, Pt_Leave);
pragma Interface_Name (Pt_Leave, "PT_LEAVE");
pragma Interface (Ada, Pt_Safe_Leave);
pragma Interface_Name (Pt_Safe_Leave, "PT_SAFE_LEAVE");
pragma Interface (Ada, Pt_Init);
pragma Interface_Name (Pt_Init, "PT_INIT");
pragma Interface (Ada, Pt_Elab_List);
pragma Interface_Name (Pt_Elab_List, "PT_ELAB_LIST");
pragma Interface (Ada, Pt_Link);
pragma Interface_Name (Pt_Link, "PT_LINK");
pragma Interface (Ada, Pt_Count);
pragma Interface_Name (Pt_Count, "PT_COUNT");
pragma Interface (Ada, Pt_Abort);
pragma Interface_Name (Pt_Abort, "PT_ABORT");
-- PRIORITY_CEILING
pragma Interface (Ada, Pt_Ceiling_Init);
pragma Interface_Name (Pt_Ceiling_Init, "PT_CEILING_INIT");
pragma Interface (Ada, Pt_Ceiling_Enter);
pragma Interface_Name (Pt_Ceiling_Enter, "PT_CEILING_ENTER");
pragma Interface (Ada, Pt_Ceiling_Leave);
pragma Interface_Name (Pt_Ceiling_Leave, "PT_CEILING_LEAVE");
pragma Interface (Ada, Pt_Ceiling_Set_Priority);
pragma Interface_Name (Pt_Ceiling_Set_Priority, "PT_CEILING_SET_PRIORITY");
pragma Interface (Ada, Pt_Ceiling_Get_Priority);
pragma Interface_Name (Pt_Ceiling_Get_Priority, "PT_CEILING_GET_PRIORITY");
-- PRIORITY_CEILING
end V_I_Pass;
nblk1=c
nid=0
hdr6=18
[0x00] rec0=1e rec1=00 rec2=01 rec3=02e
[0x01] rec0=18 rec1=00 rec2=02 rec3=062
[0x02] rec0=19 rec1=00 rec2=03 rec3=05e
[0x03] rec0=19 rec1=00 rec2=04 rec3=064
[0x04] rec0=1a rec1=00 rec2=05 rec3=046
[0x05] rec0=15 rec1=00 rec2=06 rec3=058
[0x06] rec0=13 rec1=00 rec2=07 rec3=088
[0x07] rec0=12 rec1=00 rec2=08 rec3=016
[0x08] rec0=13 rec1=00 rec2=09 rec3=05a
[0x09] rec0=17 rec1=00 rec2=0a rec3=076
[0x0a] rec0=19 rec1=00 rec2=0b rec3=04c
[0x0b] rec0=0a rec1=00 rec2=0c rec3=000
tail 0x2154978da874f7c058ca0 0x42a00088462060003