CVS difference for ai05s/ai05-0174-1.txt
--- ai05s/ai05-0174-1.txt 2010/04/05 20:20:38 1.5
+++ ai05s/ai05-0174-1.txt 2010/08/13 05:32:36 1.6
@@ -1,5 +1,7 @@
-!standard D.10.1 (00) 10-04-05 AI05-0174-1/03
+!standard D.10.1 (00) 10-08-12 AI05-0174-1/04
!class Amendment 09-10-23
+!status Amendment 2012 10-08-12
+!status ARG Approved 10-0-0 10-06-19
!status work item 10-03-13
!status ARG Approved 9-0-2 10-02-26
!status work item 09-10-23
@@ -65,7 +67,7 @@
!wording
-D.10.1 Barriers
+D.10.1 Synchronous Barriers
This clause introduces a language-defined package to synchronously release a
group of tasks after the number of blocked tasks reaches a specified count
@@ -76,26 +78,30 @@
The following language-defined library package exists:
package Ada.Synchronous_Barriers is
- pragma Pure(Synchronous_Barriers);
+ pragma Preelaborate(Synchronous_Barriers);
subtype Barrier_Limit is Positive range 1 .. <implementation-defined>;
type Synchronous_Barrier (Number_Waiting : Barrier_Limit) is limited private;
- procedure Wait_For_Release (The_Barrier : in out Synchronous_Barrier;
- Released_Last : out Boolean);
+ procedure Wait_For_Release (The_Barrier : in out Synchronous_Barrier;
+ Notified : out Boolean);
+private
+ -- not specified by the language
end Ada.Synchronous_Barriers;
+Type Synchronous_Barrier needs finalization (see 7.6).
+
Dynamic Semantics
Each call to Wait_For_Release blocks the calling task until the number of
blocked tasks associated with the Synchronous_Barrier object is equal to
-Number_Waiting, at which time all blocked tasks are released. Released_Last is
+Number_Waiting, at which time all blocked tasks are released. Notified is
set to True for one of the released tasks, and set to False for all other
released tasks.
-The selection for determining which task sets Released_Last to True is
+The mechanism for determining which task sets Notified to True is
implementation defined.
Once all tasks have been released, a Synchronous_Barrier object may be reused to
@@ -201,9 +207,65 @@
(T => Task_Identification.Current_Task));
end if;
end Test_Barriers;
+
+!corrigendum D.10.1(0)
+
+@dinsc
+
+This clause introduces a language-defined package to synchronously release a
+group of tasks after the number of blocked tasks reaches a specified count
+value.
+
+@s8<@i<Static Semantics>>
+
+The following language-defined library package exists:
+
+@xcode<@b<package> Ada.Synchronous_Barriers @b<is>
+ @b<pragma> Preelaborate(Synchronous_Barriers);
+
+ @b<subtype> Barrier_Limit @b<is> Positive @b<range> 1 .. @ft<@i<implementation-defined>>;
+
+ @b<type> Synchronous_Barrier (Number_Waiting : Barrier_Limit) @b<is limited private>;
+
+ @b<procedure> Wait_For_Release (The_Barrier : @b<in out> Synchronous_Barrier;
+ Notified : @b<out> Boolean);
+
+@b<private>
+ -- @ft<@i<not specified by the language>>
+@b<end> Ada.Synchronous_Barriers;>
+
+Type Synchronous_Barrier needs finalization (see 7.6).
+
+@s8<@i<Dynamic Semantics>>
+
+Each call to Wait_For_Release blocks the calling task until the number of
+blocked tasks associated with the Synchronous_Barrier object is equal to
+Number_Waiting, at which time all blocked tasks are released. Notified is
+set to True for one of the released tasks, and set to False for all other
+released tasks.
+
+The mechanism for determining which task sets Notified to True is
+implementation defined.
+
+Once all tasks have been released, a Synchronous_Barrier object may be reused to
+block another Number_Waiting number of tasks.
+
+As the first step of the finalization of a Synchronous_Barrier, each blocked
+task is unblocked and Program_Error is raised at the place of the call to
+Wait_For_Release.
+
+It is implementation-defined whether an abnormal task which is waiting on a
+Synchronous_Barrier object is aborted immediately or aborted when the tasks
+waiting on the object are released.
---!corrigendum D.10.1(0)
+Wait_For_Release is a potentially blocking operation (see 9.5.1).
+@s8<@i<Bounded (Run-Time) Errors>>
+
+It is a bounded error to call Wait_For_Release on a Synchronous_Barrier object
+after that object is finalized. If the error is detected, Program_Error is
+raised. Otherwise, the call proceeds normally, which may leave a task blocked
+forever.
!ACATS test
Questions? Ask the ACAA Technical Agent