OSDN Git Service

2011-08-29 Robert Dewar <dewar@adacore.com>
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 29 Aug 2011 11:01:53 +0000 (11:01 +0000)
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 29 Aug 2011 11:01:53 +0000 (11:01 +0000)
* 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

gcc/ada/ChangeLog
gcc/ada/a-synbar-posix.adb
gcc/ada/a-synbar-posix.ads
gcc/ada/a-synbar.adb
gcc/ada/a-synbar.ads
gcc/ada/snames.ads-tmpl

index e9a05ad..4dfff55 100644 (file)
@@ -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.
index c31228e..c98a460 100644 (file)
@@ -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;
 
index 80d9b20..4c01852 100644 (file)
@@ -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);
index 8efaef6..8142dcd 100644 (file)
@@ -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;
index c450624..6c084c2 100644 (file)
@@ -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
index 18cf0f8..3ff20b4 100644 (file)
@@ -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 + $;