summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2011-08-29 11:01:53 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2011-08-29 11:01:53 +0000
commit27f427e4789eb74d3ba3ccd667ec3b9f93a1503d (patch)
tree4d92fb31b56630df69ccb831e849a61f7efdb0cc
parenta2f13eb0516bc500cd9d8913617e652ac2a9d0f9 (diff)
downloadgcc-27f427e4789eb74d3ba3ccd667ec3b9f93a1503d.tar.gz
2011-08-29 Robert Dewar <dewar@adacore.com>
* a-synbar.ads, a-synbar.adb, a-synbar-posix.adb, a-synbar-posix.ads: Minor reformatting. 2011-08-29 Yannick Moy <moy@adacore.com> * snames.ads-tmpl: Add name Force. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@178202 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ada/ChangeLog9
-rw-r--r--gcc/ada/a-synbar-posix.adb7
-rw-r--r--gcc/ada/a-synbar-posix.ads15
-rw-r--r--gcc/ada/a-synbar.adb19
-rw-r--r--gcc/ada/a-synbar.ads5
-rw-r--r--gcc/ada/snames.ads-tmpl2
6 files changed, 35 insertions, 22 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index e9a05ad2432..4dfff556c2b 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,12 @@
+2011-08-29 Robert Dewar <dewar@adacore.com>
+
+ * a-synbar.ads, a-synbar.adb, a-synbar-posix.adb,
+ a-synbar-posix.ads: Minor reformatting.
+
+2011-08-29 Yannick Moy <moy@adacore.com>
+
+ * snames.ads-tmpl: Add name Force.
+
2011-08-29 Pascal Obry <obry@adacore.com>
* prj-nmsc.adb: Minor reformatting.
diff --git a/gcc/ada/a-synbar-posix.adb b/gcc/ada/a-synbar-posix.adb
index c31228e0eaa..c98a460dcdf 100644
--- a/gcc/ada/a-synbar-posix.adb
+++ b/gcc/ada/a-synbar-posix.adb
@@ -46,8 +46,7 @@ package body Ada.Synchronous_Barriers is
function pthread_barrier_init
(barrier : not null access pthread_barrier_t;
attr : System.Address := System.Null_Address;
- count : unsigned)
- return int;
+ count : unsigned) return int;
pragma Import (C, pthread_barrier_init, "pthread_barrier_init");
-- Initialize barrier with the attributes in attr. The barrier is opened
-- when count waiters arrived. If attr is null the default barrier
@@ -70,7 +69,6 @@ package body Ada.Synchronous_Barriers is
overriding procedure Finalize (Barrier : in out Synchronous_Barrier) is
Result : int;
-
begin
Result := pthread_barrier_destroy (Barrier.POSIX_Barrier'Access);
pragma Assert (Result = 0);
@@ -78,7 +76,6 @@ package body Ada.Synchronous_Barriers is
overriding procedure Initialize (Barrier : in out Synchronous_Barrier) is
Result : int;
-
begin
Result := pthread_barrier_init
(barrier => Barrier.POSIX_Barrier'Access,
@@ -93,7 +90,7 @@ package body Ada.Synchronous_Barriers is
procedure Wait_For_Release
(The_Barrier : in out Synchronous_Barrier;
- Notified : out Boolean)
+ Notified : out Boolean)
is
Result : int;
diff --git a/gcc/ada/a-synbar-posix.ads b/gcc/ada/a-synbar-posix.ads
index 80d9b201e56..4c01852b0e6 100644
--- a/gcc/ada/a-synbar-posix.ads
+++ b/gcc/ada/a-synbar-posix.ads
@@ -47,8 +47,9 @@ package Ada.Synchronous_Barriers is
type Synchronous_Barrier (Release_Threshold : Barrier_Limit) is
limited private;
- procedure Wait_For_Release (The_Barrier : in out Synchronous_Barrier;
- Notified : out Boolean);
+ procedure Wait_For_Release
+ (The_Barrier : in out Synchronous_Barrier;
+ Notified : out Boolean);
private
-- POSIX barrier data type
@@ -56,8 +57,8 @@ private
SIZEOF_PTHREAD_BARRIER_T : constant :=
(if System.Word_Size = 64 then 32 else 20);
-- Value defined according to the linux definition in pthreadtypes.h. On
- -- other system, MIPS IRIX, the object is smaller, so it works correctly
- -- although we are wasting some space.
+ -- other system, e.g. MIPS IRIX, the object is smaller, so it works
+ -- correctly although we are wasting some space.
type pthread_barrier_t_view is (size_based, align_based);
@@ -74,9 +75,9 @@ private
type Synchronous_Barrier (Release_Threshold : Barrier_Limit) is
new Ada.Finalization.Limited_Controlled with
- record
- POSIX_Barrier : aliased pthread_barrier_t;
- end record;
+ record
+ POSIX_Barrier : aliased pthread_barrier_t;
+ end record;
overriding procedure Initialize (Barrier : in out Synchronous_Barrier);
overriding procedure Finalize (Barrier : in out Synchronous_Barrier);
diff --git a/gcc/ada/a-synbar.adb b/gcc/ada/a-synbar.adb
index 8efaef6d036..8142dcd395f 100644
--- a/gcc/ada/a-synbar.adb
+++ b/gcc/ada/a-synbar.adb
@@ -36,6 +36,7 @@
package body Ada.Synchronous_Barriers is
protected body Synchronous_Barrier is
+
-- The condition "Wait'Count = Release_Threshold" opens the barrier when
-- the required number of tasks is reached. The condition "Keep_Open"
-- leaves the barrier open while there are queued tasks. While there are
@@ -43,19 +44,21 @@ package body Ada.Synchronous_Barriers is
-- barrier will remain open only for those tasks already inside.
entry Wait (Notified : out Boolean)
- when Wait'Count = Release_Threshold or else Keep_Open is
+ when Wait'Count = Release_Threshold or else Keep_Open
+ is
begin
- -- If we are executing the entry it means that the required number
- -- of tasks have been queued in the entry. Keep_Open barrier will
- -- remain true until all queued tasks are out.
+ -- If we are executing the entry it means that the required number of
+ -- tasks have been queued in the entry. Keep_Open barrier will remain
+ -- true until all queued tasks are out.
Keep_Open := Wait'Count > 0;
- -- The last released task will close the barrier and get the
- -- Notified token.
+ -- The last released task will close the barrier and get the Notified
+ -- token.
Notified := Wait'Count = 0;
end Wait;
+
end Synchronous_Barrier;
----------------------
@@ -64,8 +67,10 @@ package body Ada.Synchronous_Barriers is
procedure Wait_For_Release
(The_Barrier : in out Synchronous_Barrier;
- Notified : out Boolean) is
+ Notified : out Boolean)
+ is
begin
The_Barrier.Wait (Notified);
end Wait_For_Release;
+
end Ada.Synchronous_Barriers;
diff --git a/gcc/ada/a-synbar.ads b/gcc/ada/a-synbar.ads
index c4506246702..6c084c23f43 100644
--- a/gcc/ada/a-synbar.ads
+++ b/gcc/ada/a-synbar.ads
@@ -41,8 +41,9 @@ package Ada.Synchronous_Barriers is
type Synchronous_Barrier (Release_Threshold : Barrier_Limit) is
limited private;
- procedure Wait_For_Release (The_Barrier : in out Synchronous_Barrier;
- Notified : out Boolean);
+ procedure Wait_For_Release
+ (The_Barrier : in out Synchronous_Barrier;
+ Notified : out Boolean);
private
protected type Synchronous_Barrier (Release_Threshold : Barrier_Limit) is
diff --git a/gcc/ada/snames.ads-tmpl b/gcc/ada/snames.ads-tmpl
index 18cf0f82f2e..3ff20b4139d 100644
--- a/gcc/ada/snames.ads-tmpl
+++ b/gcc/ada/snames.ads-tmpl
@@ -631,8 +631,8 @@ package Snames is
Name_Entry_Count : constant Name_Id := N + $;
Name_External_Name : constant Name_Id := N + $;
Name_First_Optional_Parameter : constant Name_Id := N + $;
+ Name_Force : constant Name_Id := N + $;
Name_Form : constant Name_Id := N + $;
- Name_Formal_Proof : constant Name_Id := N + $;
Name_G_Float : constant Name_Id := N + $;
Name_Gcc : constant Name_Id := N + $;
Name_Gnat : constant Name_Id := N + $;