summaryrefslogtreecommitdiff
path: root/gcc/ada/g-boubuf.ads
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2005-09-05 08:07:00 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2005-09-05 08:07:00 +0000
commit1d9b970a8fc86e69c3eeb9314b9a5de609047115 (patch)
tree4719707ee1466c01c795cf2a027236826eba7d41 /gcc/ada/g-boubuf.ads
parent0759bfdcbc2b16b34d811b699902287f5386df46 (diff)
downloadgcc-1d9b970a8fc86e69c3eeb9314b9a5de609047115.tar.gz
2005-09-01 Robert Dewar <dewar@adacore.com>
* a-dirval-mingw.adb, a-direct.adb, a-coinve.adb, g-dynhta.adb, g-dynhta.ads, cstand.adb, exp_smem.adb, g-debuti.ads, g-dirope.adb, g-table.adb, lib-sort.adb, sem_maps.adb, exp_fixd.adb, exp_aggr.adb, a-intnam-mingw.ads, a-intnam-vxworks.ads, g-arrspl.adb, g-arrspl.ads, g-awk.adb, g-awk.ads, g-boubuf.ads, g-boubuf.ads, g-boubuf.ads, g-bubsor.ads, g-bubsor.adb, g-busora.adb, g-busora.ads, g-busorg.adb, g-busorg.ads, g-calend.adb, g-calend.ads, g-casuti.adb, g-casuti.ads, g-catiio.adb, g-catiio.ads, g-cgi.adb, g-cgi.ads, g-cgicoo.adb, g-cgicoo.ads, g-cgideb.adb, g-cgideb.ads, g-comlin.adb, g-comver.ads, g-semaph.ads, g-socthi.ads, sem_ch7.adb, a-direio.adb, a-caldel.ads, i-cstrea-vms.adb, a-ztedit.adb, a-ztenau.adb, g-socthi-vms.adb, g-socthi-vms.ads, g-socthi-mingw.adb, g-socthi-mingw.ads, g-socthi-vxworks.ads, a-intnam-irix.ads, a-intnam-irix.ads, a-intnam-hpux.ads, a-intnam-os2.ads, a-intnam-os2.ads, a-caldel-vms.adb, a-calend-vms.adb, a-calend-vms.ads, g-heasor.adb, g-heasor.ads, g-hesora.adb, g-hesora.ads, g-hesorg.adb, g-hesorg.ads, g-htable.adb, g-htable.ads, g-io.adb, g-io.ads, g-io_aux.adb, g-io_aux.ads, g-locfil.ads, g-memdum.adb, g-memdum.ads, g-traceb.adb, g-traceb.ads, i-cobol.adb, i-cobol.ads, i-cstrea.ads, i-cstrin.adb, a-wtedit.adb, a-tifiio.adb, a-wtenau.adb, a-wtenau.adb, a-teioed.adb: Minor reformatting git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@103894 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/g-boubuf.ads')
-rw-r--r--gcc/ada/g-boubuf.ads38
1 files changed, 20 insertions, 18 deletions
diff --git a/gcc/ada/g-boubuf.ads b/gcc/ada/g-boubuf.ads
index 9fbca493851..9641d37c9af 100644
--- a/gcc/ada/g-boubuf.ads
+++ b/gcc/ada/g-boubuf.ads
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
--- Copyright (C) 2003 Ada Core Technologies, Inc. --
+-- Copyright (C) 2003-2005, AdaCore --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -44,35 +44,34 @@ with System;
generic
type Element is private;
-- The type of the values contained within buffer objects
+
package GNAT.Bounded_Buffers is
pragma Pure;
type Content is array (Positive range <>) of Element;
- -- Content is an internal artefact that cannot be hidden
- -- because protected types cannot contain type declarations.
+ -- Content is an internal artefact that cannot be hidden because protected
+ -- types cannot contain type declarations.
Default_Ceiling : constant System.Priority := System.Default_Priority;
- -- A convenience value for the Ceiling discriminant.
+ -- A convenience value for the Ceiling discriminant
protected type Bounded_Buffer
(Capacity : Positive;
- -- Objects of type Bounded_Buffer specify the maximum
- -- number of Element values they can hold via the
- -- discriminant Capacity.
+ -- Objects of type Bounded_Buffer specify the maximum number of Element
+ -- values they can hold via the discriminant Capacity.
+
Ceiling : System.Priority)
- -- Users must specify the ceiling priority for the object.
- -- If the Real-Time Systems Annex is not in use this value
- -- is not important.
+ -- Users must specify the ceiling priority for the object. If the
+ -- Real-Time Systems Annex is not in use this value is not important.
is
pragma Priority (Ceiling);
entry Insert (Item : in Element);
- -- Insert Item into the buffer. Blocks caller
- -- until space is available.
+ -- Insert Item into the buffer, blocks caller until space is available
entry Remove (Item : out Element);
- -- Remove next available Element from buffer.
- -- Blocks caller until an Element is available.
+ -- Remove next available Element from buffer. Blocks caller until an
+ -- Element is available.
function Empty return Boolean;
-- Returns whether the instance contains any Elements.
@@ -89,13 +88,16 @@ package GNAT.Bounded_Buffers is
private
Values : Content (1 .. Capacity);
- -- The container for the values held by the buffer instance.
+ -- The container for the values held by the buffer instance
+
Next_In : Positive := 1;
- -- The index of the next Element inserted. Wraps around.
+ -- The index of the next Element inserted. Wraps around
+
Next_Out : Positive := 1;
- -- The index of the next Element removed. Wraps around.
+ -- The index of the next Element removed. Wraps around
+
Count : Natural := 0;
- -- The number of Elements currently held.
+ -- The number of Elements currently held
end Bounded_Buffer;
end GNAT.Bounded_Buffers;