DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400 Tapes

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 Tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download
Index: ┃ T V

⟦e8edf0311⟧ TextFile

    Length: 2785 (0xae1)
    Types: TextFile
    Names: »V«

Derivation

└─⟦afbc8121e⟧ Bits:30000532 8mm tape, Rational 1000, MC68020_OS2000 7_2_2
    └─ ⟦77aa8350c⟧ »DATA« 
        └─⟦f794ecd1d⟧ 
            └─⟦24d1ddd49⟧ 
                └─⟦this⟧ 

TextFile

--    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 Tasking_Types;

package Task_Serialization is

    subtype Task_Id is Tasking_Types.Task_Id;

    type Q_Element;
    type Q_Link is access Q_Element;
    for Q_Link'Storage_Size use 0;

    type Q_Element is
        record
            Next : Q_Link;
            Key  : Task_Id;
        end record;
    for Q_Element use
        record at mod 4;
            Next at 0 range 0 .. 31;
            Key  at 4 range 0 .. 31;
        end record;

    type Lock is new Q_Element;
    -- lock objects must be initialized to (null, null);

    Tasking_Lock : Lock;
    -- This lock is global state, which is modified
    -- by the acquire and release subprograms.

    function Acquire_Lock (The_Lock : Lock := Tasking_Lock) return Task_Id;
    -- Acquire the lock and return current task id

    procedure Reacquire_Lock (The_Lock : Lock := Tasking_Lock);
    -- Same as the function, except the task_id is ignored.

    procedure Release_Lock;
    -- Release the lock

private

    pragma Import_Object (Tasking_Lock, "__TASKING_LOCK");

    pragma Interface (Asm, Acquire_Lock);
    pragma Import_Function (Internal  => Acquire_Lock,
                            External  => "__SERIALIZATION.ACQUIRE_LOCK",
                            Mechanism => (Reference));

    pragma Interface (Asm, Reacquire_Lock);
    pragma Import_Procedure (Internal  => Reacquire_Lock,
                             External  => "__SERIALIZATION.ACQUIRE_LOCK",
                             Mechanism => (Reference));

    pragma Interface (Asm, Release_Lock);
    pragma Import_Procedure (Internal => Release_Lock,
                             External => "__RELEASE_TASK_LOCK");

end Task_Serialization;  
pragma Export_Elaboration_Procedure ("__SERIALIZATION_SPEC_ELAB");  
pragma Runtime_Unit (Unit_Number         => Runtime_Ids.Runtime_Compunit,
                     Elab_Routine_Number => Runtime_Ids.Internal);