|
|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 Tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T V
Length: 14969 (0x3a79)
Types: TextFile
Names: »V«
└─⟦afbc8121e⟧ Bits:30000532 8mm tape, Rational 1000, MC68020_OS2000 7_2_2
└─⟦77aa8350c⟧ »DATA«
└─⟦f794ecd1d⟧
└─⟦24d1ddd49⟧
└─⟦this⟧
-- The use of this system is subject to the software license terms and
-- conditions agreed upon between Rational and the Customer.
--
-- Copyright 1988 by Rational.
--
-- RESTRICTED RIGHTS LEGEND
--
-- Use, duplication, or disclosure by the Government is subject to
-- restrictions as set forth in subdivision (b)(3)(ii) of the Rights in
-- Technical Data and Computer Software clause at 52.227-7013.
--
--
-- Rational
-- 3320 Scott Boulevard
-- Santa Clara, California 95054-3197
--
-- PROPRIETARY AND CONFIDENTIAL INFORMATION OF RATIONAL;
-- USE OR COPYING WITHOUT EXPRESS WRITTEN AUTHORIZATION
-- IS STRICTLY PROHIBITED. THIS MATERIAL IS PROTECTED AS
-- AN UNPUBLISHED WORK UNDER THE U.S. COPYRIGHT ACT OF
-- 1976. CREATED 1988. ALL RIGHTS RESERVED.
--
--
with Runtime_Ids;
with Exceptions;
with System_Definitions;
with Message_Queues;
with Timer;
package Tasking_Types is
use System_Definitions.Operators;
Word : constant := System_Definitions.Word;
Word_Length : constant := System_Definitions.Word_Length;
subtype System_Address is System_Definitions.Address;
subtype Address_Ref is System_Definitions.Address_Ref;
subtype Priority is System_Definitions.Priority;
-- Task Id definition
type Task_Control_Block;
type Task_Id is access Task_Control_Block;
for Task_Id'Storage_Size use 0;
Tcb_Collection : System_Address;
pragma Import_Object (Tcb_Collection, "__TT_TCB_CLCTN");
type Layer;
type Layer_Id is access Layer;
for Layer_Id'Storage_Size use 0;
type List is
record
Next : Task_Id;
end record;
for List use
record
at mod 4;
Next at 0 * Word range 0 .. Word_Length - 1;
end record;
\f
type Entry_Id is range 0 .. 2 ** 15 - 1;
subtype Valid_Entry_Id is Entry_Id range 1 .. Entry_Id'Last;
subtype Entry_Number is Entry_Id;
type Alternative_Number is range 0 .. 2 ** 15 - 1;
for Alternative_Number'Size use 16;
type Select_Branch_Table is array (Entry_Id range <>) of Alternative_Number;
pragma Pack (Select_Branch_Table);
type Select_Branch_Table_Skin (Max_Entry : Entry_Id) is
record
Table : Select_Branch_Table (0 .. Max_Entry);
end record;
type Branch_Table_Link is access Select_Branch_Table_Skin;
for Branch_Table_Link'Storage_Size use 0;
Branch_Table_Collection : System_Address;
pragma Import_Object (Branch_Table_Collection, "__TT_BRANCH_TABLE_CLCTN");
-- Object for collection created by runtime
type Wait_List_Skin (Max_Index : Message_Queues.Wait_List_Index) is
record
List : Message_Queues.Wait_List (0 .. Max_Index);
end record;
type Wait_List_Link is access Wait_List_Skin;
for Wait_List_Link'Storage_Size use 0;
Wait_List_Collection : System_Address;
pragma Import_Object (Wait_List_Collection, "__TT_WAIT_LIST_CLCTN");
-- Object for collection created by runtime
type Queue_Info is
record
Wait_List : Wait_List_Link;
Branch_Table : Branch_Table_Link;
Accept_List : Wait_List_Link;
end record;
for Queue_Info use
record
at mod 4;
Wait_List at 0 * Word range 0 .. Word_Length - 1;
Branch_Table at 1 * Word range 0 .. Word_Length - 1;
Accept_List at 2 * Word range 0 .. Word_Length - 1;
end record;
type Entry_Info is
record
Quick : Boolean;
Entry_Number : Entry_Id;
end record;
for Entry_Info use
record at mod 2;
Quick at 0 range 0 .. 0;
Entry_Number at 0 range 1 .. 15;
end record;
type Entry_Vector is array (Alternative_Number range <>) of Entry_Info;
type Select_Form is new Short_Integer;
Terminate_Form : constant Select_Form := -1;
Delay_Form : constant Select_Form := 0;
Else_Form : constant Select_Form := 1;
type Select_Information (Arms : Alternative_Number) is
record
Form : Select_Form;
Delay_Time : Duration;
Delay_Arm : Alternative_Number;
Map : Entry_Vector (1 .. Arms);
end record;
for Select_Information use
record at mod 4;
Form at 0 range 0 .. 15;
Arms at 2 range 0 .. 15;
Delay_Time at 4 range 0 .. 31;
Delay_Arm at 8 range 0 .. 15;
end record;
type Select_Info is access Select_Information;
for Select_Info'Storage_Size use 0;
\f
-- type Reply_Kind is (No_Reply, Delay_Stmt_Done, Call_Timed_Out,
-- Select_Timed_Out, Activation_Group_Activated,
-- Rendezvous_Done, Dependents_Terminated,
-- Termination_Selected, Task_Aborted,
-- Child_Tcb_Reclaimable, Abortion_Acknowledged);
type Reply_Kind is new Integer;
No_Reply : constant Reply_Kind := 0;
Delay_Stmt_Done : constant Reply_Kind := 1;
Call_Timed_Out : constant Reply_Kind := 2;
Select_Timed_Out : constant Reply_Kind := 3;
Activation_Group_Activated : constant Reply_Kind := 4;
Rendezvous_Done : constant Reply_Kind := 5;
Dependents_Terminated : constant Reply_Kind := 6;
Termination_Selected : constant Reply_Kind := 7;
Task_Aborted : constant Reply_Kind := 8;
Child_Tcb_Reclaimable : constant Reply_Kind := 9;
Abortion_Acknowledged : constant Reply_Kind := 10;
type Reply_Message is
record
Kind : Reply_Kind;
end record;
for Reply_Message use
record at mod 4;
Kind at 0 * Word range 0 .. Word_Length - 1;
end record;
--for Reply_Message'Size use 32;
-- An Ada task that declares N entries will have wait list
-- and branch table arrays each indexed by the range 0 .. N,
-- for a total of N+1 array elements each.
-- The first element of the branch table array is the delay
-- alternative branch index. The first element of the wait list
-- is a special queue called the reply queue. Messages sent to
-- a reply queue are just 4-byte values of type Reply_Message;
-- messages sent to other queues are 12-byte values of type
-- Entry_Call_Message.
type Caller_Name is new Integer;
type Entry_Call_Message is
record
Caller : Caller_Name;
Rendezvous_Params : Integer; -- actually System_Address
Timer_Id : Timer.Id; -- non-null only for timed entry call
end record;
-- Caller should be a Task_Id, however this causes objects to be
-- cleared, since Task_Id is an access type. So, for efficiency,
-- the type Caller_Name is used with Unchecked_Conversion's.
for Entry_Call_Message use
record at mod 4;
Caller at 0 * Word range 0 .. Word_Length - 1;
Rendezvous_Params at 1 * Word range 0 .. Word_Length - 1;
Timer_Id at 2 * Word range 0 .. Word_Length - 1;
end record;
-- type Action is (Abnormal, Selecting_Termination,
-- Non_Callable, Exception_Pending, Activation_Done,
-- Parent_Or_Child_Ok_Tcb_Reclamation);
type Action is range 0 .. 5;
Abnormal : constant Action := 0;
Selecting_Termination : constant Action := 1;
Non_Callable : constant Action := 2;
Exception_Pending : constant Action := 3;
Activation_Done : constant Action := 4;
Parent_Or_Child_Ok_Tcb_Reclamation : constant Action := 5;
type Action_Set is array (Action) of Boolean;
pragma Pack (Action_Set);
-- type Suspension_Reason is
-- (Not_Suspended, Not_Activated, Child_Activating,
-- Awaiting_Dependent_Termination, Calling_Entry,
-- Awaiting_Entry_Call, Delaying, Terminated,
-- Awaiting_Tcb_Reclamation_Ok, Awaiting_Abortee_Reply);
type Suspension_Reason is new Short_Short_Integer;
Not_Suspended : constant Suspension_Reason := 0;
Not_Activated : constant Suspension_Reason := 1;
Child_Activating : constant Suspension_Reason := 2;
Awaiting_Dependent_Termination : constant Suspension_Reason := 3;
Calling_Entry : constant Suspension_Reason := 4;
Awaiting_Entry_Call : constant Suspension_Reason := 5;
Delaying : constant Suspension_Reason := 6;
Terminated : constant Suspension_Reason := 7;
Awaiting_Tcb_Reclamation_Ok : constant Suspension_Reason := 8;
Awaiting_Abortee_Reply : constant Suspension_Reason := 9;
type Bounds_For_Stack is
record
First : System_Address;
Size : Integer;
end record;
for Bounds_For_Stack use
record
at mod 4;
First at 0 * Word range 0 .. Word_Length - 1;
Size at 1 * Word range 0 .. Word_Length - 1;
end record;
subtype Dependent_Count is Natural;
type Buffer_Item;
type Buffer_List is access Buffer_Item;
for Buffer_List'Storage_Size use 0;
Buffer_Item_Collection : System_Address;
pragma Import_Object (Buffer_Item_Collection, "__TT_BUFFER_ITEM_CLCTN");
-- Object for collection created by runtime
type Buffer_Item is
record
Buffer : Integer;
Slot_Data : Integer;
Next : Buffer_List;
end record;
type Task_Control_Block is
record
Checksum : Integer;
Exception_Id : Exceptions.Name;
Stack_Bounds : Bounds_For_Stack;
Code_Start_Ref : Address_Ref;
Process_Id : Integer;
Action_State : Action_Set;
Current_Priority : Priority;
Partner_Priority : Priority;
Suspension_State : Suspension_Reason;
Current_Layer : Layer_Id;
Queues : Queue_Info;
Master_Block : Layer_Id;
Layer_Link : List;
Callers_Head : List;
Callers_Link : List;
Activations_In_Progress : Integer;
Spare_Word0 : Integer;
Ipc_Buffer_List : Buffer_List;
Parent_Tcb : Task_Id;
Parent_Frame_Link : Integer;
Instance_Variable : System_Address;
end record;
for Task_Control_Block use
record
at mod 4;
Checksum at 0 * Word range 0 .. Word_Length - 1;
Exception_Id at 1 * Word range 0 .. Word_Length - 1;
Stack_Bounds at 2 * Word range 0 .. 2 * Word_Length - 1;
Code_Start_Ref at 4 * Word range 0 .. Word_Length - 1;
Process_Id at 5 * Word range 0 .. Word_Length - 1;
Action_State at 6 * Word range 0 .. 7;
Current_Priority at 6 * Word range 8 .. 15;
Partner_Priority at 6 * Word range 16 .. 23;
Suspension_State at 6 * Word range 24 .. Word_Length - 1;
Current_Layer at 7 * Word range 0 .. Word_Length - 1;
Queues at 8 * Word range 0 .. 3 * Word_Length - 1;
Master_Block at 11 * Word range 0 .. Word_Length - 1;
Layer_Link at 12 * Word range 0 .. Word_Length - 1;
Callers_Head at 13 * Word range 0 .. Word_Length - 1;
Callers_Link at 14 * Word range 0 .. Word_Length - 1;
Activations_In_Progress at 15 * Word range 0 .. Word_Length - 1;
Spare_Word0 at 16 * Word range 0 .. Word_Length - 1;
Ipc_Buffer_List at 17 * Word range 0 .. Word_Length - 1;
Parent_Tcb at 18 * Word range 0 .. Word_Length - 1;
Parent_Frame_Link at 19 * Word range 0 .. Word_Length - 1;
Instance_Variable at 20 * Word range 0 .. Word_Length - 1;
end record;
-- type Coldness_Value is (Cold, Cool, Warm, Root);
type Coldness_Value is new Integer;
Cold : constant Coldness_Value := 0;
Cool : constant Coldness_Value := 1;
Warm : constant Coldness_Value := 2;
Root : constant Coldness_Value := 3;
type Layer is
record
Dependent_Task_List : List;
Master_Task : Task_Id;
Layer_Link : Layer_Id;
Non_Terminated : Dependent_Count;
Non_Terminable : Dependent_Count;
Coldness : Coldness_Value;
end record;
for Layer use
record
at mod 4;
Dependent_Task_List at 0 * Word range 0 .. Word_Length - 1;
Master_Task at 1 * Word range 0 .. Word_Length - 1;
Layer_Link at 2 * Word range 0 .. Word_Length - 1;
Non_Terminated at 3 * Word range 0 .. Word_Length - 1;
Non_Terminable at 4 * Word range 0 .. Word_Length - 1;
Coldness at 5 * Word range 0 .. Word_Length - 1;
end record;
type Group_Ref is access Task_Id;
for Group_Ref'Storage_Size use 0;
-- The Parameter_Ref and Parameter_Size values passed to Process_Ops.Fork
-- should be the address and size, respectively, of a value of type
-- Fork_Parameters.
type Fork_Parameters is
record
Code_Start : System_Address;
Global_Base_Address : System_Address;
New_Task_Id : Task_Id;
Instance_Variable : System_Address;
end record;
for Fork_Parameters use
record
at mod 4;
Code_Start at 0 * Word range 0 .. Word_Length - 1;
Global_Base_Address at 1 * Word range 0 .. Word_Length - 1;
New_Task_Id at 2 * Word range 0 .. Word_Length - 1;
Instance_Variable at 3 * Word range 0 .. Word_Length - 1;
end record;
end Tasking_Types;
pragma Export_Elaboration_Procedure ("__TASKING_TYPES_SPEC_ELAB");
pragma Runtime_Unit (Unit_Number => Runtime_Ids.Runtime_Compunit,
Elab_Routine_Number => Runtime_Ids.Internal);