File : bc-containers-maps-unbounded-guarded.ads


-- Copyright (C) 1994-1999 Grady Booch and Simon Wright.
-- All Rights Reserved.
--
--      This program is free software; you can redistribute it
--      and/or modify it under the terms of the Ada Community
--      License which comes with this Library.
--
--      This program is distributed in the hope that it will be
--      useful, but WITHOUT ANY WARRANTY; without even the implied
--      warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
--      PURPOSE. See the Ada Community License for more details.
--      You should have received a copy of the Ada Community
--      License with this library, in the file named "Ada Community
--      License" or "ACL". If not, contact the author of this library
--      for a copy.
--

-- $Id: bc-containers-maps-unbounded-guarded.ads,v 1.1.2.1 2000/02/19 10:23:08 simon Exp $

with BC.Support.Synchronization;

generic
  type Semaphore is new BC.Support.Synchronization.Semaphore_Base with private;
package BC.Containers.Maps.Unbounded.Guarded is

  pragma Elaborate_Body;

  type Guarded_Unbounded_Map is new Unbounded_Map with private;

  function "=" (Left, Right : in Guarded_Unbounded_Map) return Boolean;

  procedure Seize (M : in out Guarded_Unbounded_Map);

  procedure Release (M : in out Guarded_Unbounded_Map);

private

  type Guarded_Unbounded_Map is new Unbounded_Map with record
    Guard : BC.Support.Synchronization.Semaphore_P;
  end record;

  procedure Initialize (M : in out Guarded_Unbounded_Map);
  procedure Adjust (M : in out Guarded_Unbounded_Map);
  procedure Finalize (M : in out Guarded_Unbounded_Map);

end BC.Containers.Maps.Unbounded.Guarded;