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

⟦66f22cb8d⟧ Ada Source

    Length: 5120 (0x1400)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Generic_Letter_Box, seg_054fe1

Derivation

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

E3 Source Code



with Transport;
with Transport_Defs;
with Queue_Generic;  
with Text_Io;

package body Generic_Letter_Box is

    package Queue_Element is new Queue_Generic (Element => Element);

    task Guru is  
        entry Put (The_Item : Element);
        entry Get (The_Item : out Element);  
        entry Check (The_Check : out Boolean);
        entry Dispose;
        entry Init;
    end Guru;

    procedure Init is
    begin
        Guru.Init;
    end Init;

    procedure Put (The_Mail : Element) is
    begin
        Guru.Put (The_Mail);
    end Put;

    procedure Read (The_Mail : out Element) is
    begin
        Guru.Get (The_Mail);
    end Read;

    function Check return Boolean is
        The_Check : Boolean;
    begin
        Guru.Check (The_Check);
        return The_Check;
    end Check;

    procedure Dispose is
    begin
        Guru.Dispose;
    end Dispose;

    task body Guru is
        Done : Boolean := False;
        The_Queue : Queue_Element.Queue;
    begin  
        Text_Io.Put_Line ("Container launched.");
        loop
            select
                accept Put (The_Item : Element) do
                    Text_Io.Put_Line ("filling the queue.");
                    Queue_Element.Add (The_Queue, The_Item);
                end Put;

            or

                accept Get (The_Item : out Element) do
                    The_Item := Queue_Element.First (The_Queue);
                    Queue_Element.Delete (The_Queue);
                end Get;

            or

                accept Check (The_Check : out Boolean) do
                    The_Check := not Queue_Element.Is_Empty (The_Queue);
                end Check;

            or

                accept Init do
                    Queue_Element.Make_Empty (The_Queue);
                    Text_Io.Put_Line ("The queue was made empty.");
                end Init;

            or

                accept Dispose do
                    Done := True;
                end Dispose;

            else
                delay (3.0);
                Text_Io.Put_Line ("letter box's guru is alive !");
            end select;

            exit when Done = True;

        end loop;  
    end Guru;

end Generic_Letter_Box;

E3 Meta Data

    nblk1=4
    nid=0
    hdr6=8
        [0x00] rec0=2f rec1=00 rec2=01 rec3=032
        [0x01] rec0=03 rec1=00 rec2=02 rec3=026
        [0x02] rec0=20 rec1=00 rec2=03 rec3=020
        [0x03] rec0=0d rec1=00 rec2=04 rec3=000
    tail 0x2175e79d687b99179ca7b 0x42a00088462060003