DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Rational R1000/400

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦a18133725⟧ Ada Source

    Length: 8192 (0x2000)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, generic, package Cifo_Event_Management, seg_0213db

Derivation

└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
    └─ ⟦5a81ac88f⟧ »Space Info Vol 1« 
        └─⟦this⟧ 

E3 Source Code



-- "This unpublished work is protected both as a proprietary work and
-- under the Universal Copyright Convention and the US Copyright Act of
-- 1976. Its distribution and access are limited only to authorized
-- persons. Copr. (c) Alsys. Created 1990, initially licensed 1990.
-- All rights reserved.

-- Unauthorized  use (including use to prepare other works), disclosure,
-- reproduction, or distribution may violate national criminal law."

------------------------------------------------------------------------------
-- This module is a generic template for the EVENT_MANAGEMENT package\x09    --
-- required by CIFO 3.0, which is obtained by instantiating this generic.   --
------------------------------------------------------------------------------

--\x09    *********************
--\x09    * TABLE OF CONTENTS *
--\x09    *********************

--\x09      1. Generic Parameters
--\x09      2. User Visible Types
--\x09      3. Event Testing
--\x09      4. Signal Operations
--\x09      5. Event Construction
--\x09      6. Wait Operations
--\x09      7. IBM SOW Declarations
--\x09      13. Instantiations


generic

--\x09    *************************
--\x09    * 1. GENERIC PARAMETERS *
--\x09    *************************

    Max_Events : Integer;
    -- This parameter controls the maximum number of events which can be
    -- handled as part of a single COMPLEX_EVENT value, avoiding additional
    -- heap allocations. The size of a COMPLEX_EVENT depends on this value
    -- since enough space is allocated to hold an expression of this size.

    Signal_Max_Exceeded : Boolean := False;
    -- This parameter controls the behaviour of the system if a complex
    -- expression exceeds the threshhold specified by the MAX_EVENTS value.
    -- If the value of the parameter is FALSE, then storage for at least
    -- part of the complex event structure may be obtained from the heap.
    -- This avoids any limits on the complexity of event expressions, but
    -- can result in storage leaks. If the parameter is TRUE, then an attempt
    -- to build a complex expression exceeding the limit causes the exception
    -- MAX_EVENTS_EXCEEDED to be raised, warning the programmer that the
    -- attempted event construction may lead to storage leaks.


package Cifo_Event_Management is

    -- The library contains a standard instantiations of this package:

    -- package EVENT_MANAGEMENT
    --\x09 is new CIFO_EVENT_MANAGEMENT (MAX_EVENTS => 6,
    --\x09\x09\x09\x09       SIGNAL_MAX_EXCEEDED => FALSE);

    --\x09This generates a package which has no limit on the complexity of
    --\x09complex events, but which uses the heap if the number of events
    --\x09exceeds 6, and may thus cause storage leaks in these cases.


--\x09    *************************
--\x09    * 2. USER VISIBLE TYPES *
--\x09    *************************

    type Event is limited private;
    -- Note: we have deliberately changed this to limited private, since the
    -- semantics of both assignment and comparison of EVENTs is obscure.

    type Complex_Event is private;


--\x09    ********************
--\x09    * 3. EVENT TESTING *
--\x09    ********************

    function Is_Set (An_Event : in Event) return Boolean;
    function Is_Set (Expression : in Complex_Event) return Boolean;

    pragma Inline (Is_Set);


--\x09    ************************
--\x09    * 4. SIGNAL OPERATIONS *
--\x09    ************************

    procedure Set (Target_Event : in out Event);
    procedure Reset (Target_Event : in out Event);
    procedure Toggle (Target_Event : in out Event);
    procedure Pulse (Target_Event : in out Event);


--\x09    *************************
--\x09    * 5. EVENT CONSTRUCTION *
--\x09    *************************

    function Complex_Event_Of (Simple_Event : Event) return Complex_Event;

    function "and" (Left, Right : Event) return Complex_Event;
    function "and" (Left : Complex_Event; Right : Event) return Complex_Event;
    function "and" (Left : Event; Right : Complex_Event) return Complex_Event;
    function "and" (Left, Right : Complex_Event) return Complex_Event;

    function "or" (Left, Right : Event) return Complex_Event;
    function "or" (Left : Complex_Event; Right : Event) return Complex_Event;
    function "or" (Left : Event; Right : Complex_Event) return Complex_Event;
    function "or" (Left, Right : Complex_Event) return Complex_Event;

    function "xor" (Left, Right : Event) return Complex_Event;
    function "xor" (Left : Complex_Event; Right : Event) return Complex_Event;
    function "xor" (Left : Event; Right : Complex_Event) return Complex_Event;
    function "xor" (Left, Right : Complex_Event) return Complex_Event;

    function "not" (An_Event : Event) return Complex_Event;
    function "not" (An_Event : Complex_Event) return Complex_Event;

    Max_Events_Exceeded : exception;


--\x09    **********************
--\x09    * 6. WAIT OPERATIONS *-\x09    **********************
    --
    -- JRG Added this type for semantic consistency to allow
    -- compilation on Rational. 9/20/91 Also added private
    -- part.
    --
    type Task_Id is private;          -- Bogus Declaration

    procedure Wait_On (An_Event : in Complex_Event);

    procedure Cancel_Wait_On (Tsk : in Task_Id);
    -- This procedure is used by the SCHEDULER. It removes a task from the
    -- event structures (if it is currently chained). It is used for functions
    -- such as task abort.


--\x09    ***************************
--\x09    * 7. IBM SOW DECLARATIONS *
--\x09    ***************************

    -- This section contains renamings and additional declarations required
    -- by the IBM statement of work for the Lynx project. This SOW introduces
    -- slightly different names, apparently taken from some intermediate
    -- version of CIFO, between the 2.0 and 3.0 documents.

    subtype Event_Expression is Complex_Event;

    function Value_Of (An_Event : in Complex_Event) return Boolean
        renames Is_Set;

    function Expression_Of (Simple_Event : Event) return Complex_Event
        renames Complex_Event_Of;


    procedure Initialize (Target_Event : in out Event;
                          Value : in Boolean := False);

    pragma Inline (Initialize);

private
    --
    -- JRG Created Private Part for Compilation Closure
    -- On Rational. Added the following three types to the
    -- private part on 9/20/91.
    --
    type Event is new Boolean;            -- Bogus Declaration
    type Complex_Event is new Boolean;    -- Bogus Declaration
    type Task_Id is new Boolean;          -- Bogus Declaration
end Cifo_Event_Management;


--\x09    **********************
--\x09    * 13. INSTANTIATIONS *
--\x09    **********************

E3 Meta Data

    nblk1=7
    nid=0
    hdr6=e
        [0x00] rec0=18 rec1=00 rec2=01 rec3=006
        [0x01] rec0=18 rec1=00 rec2=02 rec3=004
        [0x02] rec0=19 rec1=00 rec2=03 rec3=012
        [0x03] rec0=20 rec1=00 rec2=04 rec3=088
        [0x04] rec0=16 rec1=00 rec2=05 rec3=002
        [0x05] rec0=1a rec1=00 rec2=06 rec3=000
        [0x06] rec0=1c rec1=00 rec2=07 rec3=000
    tail 0x2151cbb8e838d7387b00e 0x42a00088462060003