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

⟦c31877281⟧ Ada Source

    Length: 4096 (0x1000)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package body V_I_Csema, seg_04b9ab

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 System;
with Ada_Krn_Defs;
with Ada_Krn_I;
with Unchecked_Deallocation;
package body V_I_Csema is

    pragma Suppress (All_Checks);
    pragma Suppress (Exception_Tables);

    function Create (Initial_Count : Integer := 1;
                     Intr_Flag : Boolean := False;
                     Intr_Status : Intr_Status_T := Disable_Intr_Status)
                    return A_Cnt_Sema_T is
        S : Ada_Krn_Defs.A_Count_Semaphore_T :=
           new Ada_Krn_Defs.Count_Semaphore_T;
    begin
        if Intr_Flag then
            declare
                Attr_Rec : Ada_Krn_Defs.Count_Semaphore_Attr_T;
            begin
                Ada_Krn_Defs.Count_Intr_Attr_Init
                   (Ada_Krn_Defs.To_A_Count_Semaphore_Attr_T (Attr_Rec'Address),
                    Ada_Krn_Defs.Intr_Status_T (Intr_Status));
                if not Ada_Krn_I.Count_Semaphore_Init
                          (S, Initial_Count, Ada_Krn_Defs.
                                                To_A_Count_Semaphore_Attr_T
                                                (Attr_Rec'Address)) then
                    raise Storage_Error;
                end if;
            end;
        else
            if not Ada_Krn_I.Count_Semaphore_Init
                      (S, Initial_Count, Ada_Krn_Defs.
                                            Default_Count_Semaphore_Attr) then
                raise Storage_Error;
            end if;
        end if;
        return A_Cnt_Sema_T (S);
    end Create;

    procedure Free is new Unchecked_Deallocation
                             (Ada_Krn_Defs.Count_Semaphore_T,
                              Ada_Krn_Defs.A_Count_Semaphore_T);

    function Delete (Cnt_Sema : A_Cnt_Sema_T; Conditional_Delete_Flag : Boolean)
                    return Boolean is
        S : Ada_Krn_Defs.A_Count_Semaphore_T :=
           Ada_Krn_Defs.A_Count_Semaphore_T (Cnt_Sema);
    begin
        if Conditional_Delete_Flag and then
           Ada_Krn_I.Count_Semaphore_Get_In_Use (S) then
            return False;
        end if;
        Ada_Krn_I.Count_Semaphore_Destroy (S);
        Free (S);
        return True;
    end Delete;

    function Wait (Cnt_Sema : A_Cnt_Sema_T; Wait_Time : Duration)
                  return Boolean is
    begin
        return Ada_Krn_I.Count_Semaphore_Wait
                  (Ada_Krn_Defs.A_Count_Semaphore_T (Cnt_Sema), Wait_Time);
    end Wait;

    procedure Signal (Cnt_Sema : A_Cnt_Sema_T) is
    begin
        Ada_Krn_I.Count_Semaphore_Signal
           (Ada_Krn_Defs.A_Count_Semaphore_T (Cnt_Sema));
    end Signal;

    function Disable_Intr_Status return Intr_Status_T is
    begin
        return Intr_Status_T (Ada_Krn_Defs.Disable_Intr_Status);
    end Disable_Intr_Status;
end V_I_Csema;

E3 Meta Data

    nblk1=3
    nid=0
    hdr6=6
        [0x00] rec0=1b rec1=00 rec2=01 rec3=036
        [0x01] rec0=18 rec1=00 rec2=02 rec3=046
        [0x02] rec0=1b rec1=00 rec2=03 rec3=001
    tail 0x21750bd56868438236fd7 0x42a00088462060003