Patchwork [Ada] Renames System.Parameter.Sec_Stack_Ratio

login
register
mail settings
Submitter Arnaud Charlet
Date Aug. 30, 2011, 2:10 p.m.
Message ID <20110830141006.GA28486@adacore.com>
Download mbox | patch
Permalink /patch/112321/
State New
Headers show

Comments

Arnaud Charlet - Aug. 30, 2011, 2:10 p.m.
As this constant was a percentage, it is now renamed
to Sec_Stack_Percentage.
No functional change.

Tested on x86_64-pc-linux-gnu, committed on trunk

2011-08-30  Tristan Gingold  <gingold@adacore.com>

	* s-parame-vms-alpha.ads, s-parame-hpux.ads, s-tassta.adb,
	s-tarest.adb, s-parame-vms-ia64.ads, s-soflin.adb, s-secsta.adb,
	s-secsta.ads, s-parame.ads, s-parame-vxworks.ads: Renames Ratio to
	Percentage, and Sec_Stack_Ratio to Sec_Stack_Percentage.

Patch

Index: s-parame-vms-alpha.ads
===================================================================
--- s-parame-vms-alpha.ads	(revision 178293)
+++ s-parame-vms-alpha.ads	(working copy)
@@ -6,7 +6,7 @@ 
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 1992-2010, Free Software Foundation, Inc.         --
+--          Copyright (C) 1992-2011, Free Software Foundation, Inc.         --
 --                                                                          --
 -- 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- --
@@ -62,7 +62,7 @@ 
    Unspecified_Size : constant Size_Type := Size_Type'First;
    --  Value used to indicate that no size type is set
 
-   subtype Ratio is Size_Type range -1 .. 100;
+   subtype Percentage is Size_Type range -1 .. 100;
    Dynamic : constant Size_Type := -1;
    --  The secondary stack ratio is a constant between 0 and 100 which
    --  determines the percentage of the allocated task stack that is
@@ -70,10 +70,10 @@ 
    --  The special value of minus one indicates that the secondary
    --  stack is to be allocated from the heap instead.
 
-   Sec_Stack_Ratio : constant Ratio := Dynamic;
+   Sec_Stack_Percentage : constant Percentage := Dynamic;
    --  This constant defines the handling of the secondary stack
 
-   Sec_Stack_Dynamic : constant Boolean := Sec_Stack_Ratio = Dynamic;
+   Sec_Stack_Dynamic : constant Boolean := Sec_Stack_Percentage = Dynamic;
    --  Convenient Boolean for testing for dynamic secondary stack
 
    function Default_Stack_Size return Size_Type;
Index: s-parame-hpux.ads
===================================================================
--- s-parame-hpux.ads	(revision 178293)
+++ s-parame-hpux.ads	(working copy)
@@ -6,7 +6,7 @@ 
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 1992-2010, Free Software Foundation, Inc.         --
+--          Copyright (C) 1992-2011, Free Software Foundation, Inc.         --
 --                                                                          --
 -- 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- --
@@ -62,7 +62,7 @@ 
    Unspecified_Size : constant Size_Type := Size_Type'First;
    --  Value used to indicate that no size type is set
 
-   subtype Ratio is Size_Type range -1 .. 100;
+   subtype Percentage is Size_Type range -1 .. 100;
    Dynamic : constant Size_Type := -1;
    --  The secondary stack ratio is a constant between 0 and 100 which
    --  determines the percentage of the allocated task stack that is
@@ -70,10 +70,10 @@ 
    --  The special value of minus one indicates that the secondary
    --  stack is to be allocated from the heap instead.
 
-   Sec_Stack_Ratio : constant Ratio := Dynamic;
+   Sec_Stack_Percentage : constant Percentage := Dynamic;
    --  This constant defines the handling of the secondary stack
 
-   Sec_Stack_Dynamic : constant Boolean := Sec_Stack_Ratio = Dynamic;
+   Sec_Stack_Dynamic : constant Boolean := Sec_Stack_Percentage = Dynamic;
    --  Convenient Boolean for testing for dynamic secondary stack
 
    function Default_Stack_Size return Size_Type;
Index: s-tassta.adb
===================================================================
--- s-tassta.adb	(revision 178293)
+++ s-tassta.adb	(working copy)
@@ -1023,7 +1023,7 @@ 
       Secondary_Stack_Size :
         constant SSE.Storage_Offset :=
           Self_ID.Common.Compiler_Data.Pri_Stack_Info.Size *
-          SSE.Storage_Offset (Parameters.Sec_Stack_Ratio) / 100;
+          SSE.Storage_Offset (Parameters.Sec_Stack_Percentage) / 100;
 
       Secondary_Stack : aliased SSE.Storage_Array (1 .. Secondary_Stack_Size);
 
Index: s-tarest.adb
===================================================================
--- s-tarest.adb	(revision 178293)
+++ s-tarest.adb	(working copy)
@@ -6,7 +6,7 @@ 
 --                                                                          --
 --                                  B o d y                                 --
 --                                                                          --
---         Copyright (C) 1999-2010, Free Software Foundation, Inc.          --
+--         Copyright (C) 1999-2011, Free Software Foundation, Inc.          --
 --                                                                          --
 -- GNARL 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- --
@@ -184,7 +184,7 @@ 
 
       Secondary_Stack : aliased SSE.Storage_Array
         (1 .. Self_ID.Common.Compiler_Data.Pri_Stack_Info.Size *
-                SSE.Storage_Offset (Parameters.Sec_Stack_Ratio) / 100);
+                SSE.Storage_Offset (Parameters.Sec_Stack_Percentage) / 100);
 
       pragma Warnings (Off);
       Secondary_Stack_Address : System.Address := Secondary_Stack'Address;
Index: s-parame-vms-ia64.ads
===================================================================
--- s-parame-vms-ia64.ads	(revision 178293)
+++ s-parame-vms-ia64.ads	(working copy)
@@ -6,7 +6,7 @@ 
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 1992-2010, Free Software Foundation, Inc.         --
+--          Copyright (C) 1992-2011, Free Software Foundation, Inc.         --
 --                                                                          --
 -- 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- --
@@ -62,7 +62,7 @@ 
    Unspecified_Size : constant Size_Type := Size_Type'First;
    --  Value used to indicate that no size type is set
 
-   subtype Ratio is Size_Type range -1 .. 100;
+   subtype Percentage is Size_Type range -1 .. 100;
    Dynamic : constant Size_Type := -1;
    --  The secondary stack ratio is a constant between 0 and 100 which
    --  determines the percentage of the allocated task stack that is
@@ -70,10 +70,10 @@ 
    --  The special value of minus one indicates that the secondary
    --  stack is to be allocated from the heap instead.
 
-   Sec_Stack_Ratio : constant Ratio := Dynamic;
+   Sec_Stack_Percentage : constant Percentage := Dynamic;
    --  This constant defines the handling of the secondary stack
 
-   Sec_Stack_Dynamic : constant Boolean := Sec_Stack_Ratio = Dynamic;
+   Sec_Stack_Dynamic : constant Boolean := Sec_Stack_Percentage = Dynamic;
    --  Convenient Boolean for testing for dynamic secondary stack
 
    function Default_Stack_Size return Size_Type;
Index: s-soflin.adb
===================================================================
--- s-soflin.adb	(revision 178293)
+++ s-soflin.adb	(working copy)
@@ -123,7 +123,7 @@ 
       use type Parameters.Size_Type;
 
       SS_Ratio_Dynamic : constant Boolean :=
-                           Parameters.Sec_Stack_Ratio = Parameters.Dynamic;
+                          Parameters.Sec_Stack_Percentage = Parameters.Dynamic;
 
    begin
       if SS_Ratio_Dynamic then
Index: s-secsta.adb
===================================================================
--- s-secsta.adb	(revision 178293)
+++ s-secsta.adb	(working copy)
@@ -6,7 +6,7 @@ 
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---          Copyright (C) 1992-2009, Free Software Foundation, Inc.         --
+--          Copyright (C) 1992-2011, Free Software Foundation, Inc.         --
 --                                                                          --
 -- 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,7 +44,7 @@ 
    use type System.Parameters.Size_Type;
 
    SS_Ratio_Dynamic : constant Boolean :=
-                        Parameters.Sec_Stack_Ratio = Parameters.Dynamic;
+                        Parameters.Sec_Stack_Percentage = Parameters.Dynamic;
    --  There are two entirely different implementations of the secondary
    --  stack mechanism in this unit, and this Boolean is used to select
    --  between them (at compile time, so the generated code will contain
Index: s-secsta.ads
===================================================================
--- s-secsta.ads	(revision 178293)
+++ s-secsta.ads	(working copy)
@@ -6,7 +6,7 @@ 
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 1992-2009, Free Software Foundation, Inc.         --
+--          Copyright (C) 1992-2011, Free Software Foundation, Inc.         --
 --                                                                          --
 -- 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- --
@@ -47,17 +47,17 @@ 
       Size : Natural := Default_Secondary_Stack_Size);
    --  Initialize the secondary stack with a main stack of the given Size.
    --
-   --  If System.Parameters.Sec_Stack_Ratio equals Dynamic, Stk is really an
-   --  OUT parameter that will be allocated on the heap. Then all further
+   --  If System.Parameters.Sec_Stack_Percentage equals Dynamic, Stk is really
+   --  an OUT parameter that will be allocated on the heap. Then all further
    --  allocations which do not overflow the main stack will not generate
    --  dynamic (de)allocation calls. If the main Stack overflows, a new
    --  chuck of at least the same size will be allocated and linked to the
    --  previous chunk.
    --
-   --  Otherwise (Sec_Stack_Ratio between 0 and 100), Stk is an IN parameter
-   --  that is already pointing to a Stack_Id. The secondary stack in this case
-   --  is fixed, and any attempt to allocate more than the initial size will
-   --  result in a Storage_Error being raised.
+   --  Otherwise (Sec_Stack_Percentage between 0 and 100), Stk is an IN
+   --  parameter that is already pointing to a Stack_Id. The secondary stack
+   --  in this case is fixed, and any attempt to allocate more than the initial
+   --  size will result in a Storage_Error being raised.
    --
    --  Note: the reason that Stk is passed is that SS_Init is called before
    --  the proper interface is established to obtain the address of the
Index: s-parame.ads
===================================================================
--- s-parame.ads	(revision 178293)
+++ s-parame.ads	(working copy)
@@ -6,7 +6,7 @@ 
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 1992-2010, Free Software Foundation, Inc.         --
+--          Copyright (C) 1992-2011, Free Software Foundation, Inc.         --
 --                                                                          --
 -- 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- --
@@ -64,7 +64,7 @@ 
    Unspecified_Size : constant Size_Type := Size_Type'First;
    --  Value used to indicate that no size type is set
 
-   subtype Ratio is Size_Type range -1 .. 100;
+   subtype Percentage is Size_Type range -1 .. 100;
    Dynamic : constant Size_Type := -1;
    --  The secondary stack ratio is a constant between 0 and 100 which
    --  determines the percentage of the allocated task stack that is
@@ -72,10 +72,10 @@ 
    --  The special value of minus one indicates that the secondary
    --  stack is to be allocated from the heap instead.
 
-   Sec_Stack_Ratio : constant Ratio := Dynamic;
+   Sec_Stack_Percentage : constant Percentage := Dynamic;
    --  This constant defines the handling of the secondary stack
 
-   Sec_Stack_Dynamic : constant Boolean := Sec_Stack_Ratio = Dynamic;
+   Sec_Stack_Dynamic : constant Boolean := Sec_Stack_Percentage = Dynamic;
    --  Convenient Boolean for testing for dynamic secondary stack
 
    function Default_Stack_Size return Size_Type;
Index: s-parame-vxworks.ads
===================================================================
--- s-parame-vxworks.ads	(revision 178293)
+++ s-parame-vxworks.ads	(working copy)
@@ -6,7 +6,7 @@ 
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 1992-2010, Free Software Foundation, Inc.         --
+--          Copyright (C) 1992-2011, Free Software Foundation, Inc.         --
 --                                                                          --
 -- 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- --
@@ -62,7 +62,7 @@ 
    Unspecified_Size : constant Size_Type := Size_Type'First;
    --  Value used to indicate that no size type is set
 
-   subtype Ratio is Size_Type range -1 .. 100;
+   subtype Percentage is Size_Type range -1 .. 100;
    Dynamic : constant Size_Type := -1;
    --  The secondary stack ratio is a constant between 0 and 100 which
    --  determines the percentage of the allocated task stack that is
@@ -70,10 +70,10 @@ 
    --  The special value of minus one indicates that the secondary
    --  stack is to be allocated from the heap instead.
 
-   Sec_Stack_Ratio : constant Ratio := Dynamic;
+   Sec_Stack_Percentage : constant Percentage := Dynamic;
    --  This constant defines the handling of the secondary stack
 
-   Sec_Stack_Dynamic : constant Boolean := Sec_Stack_Ratio = Dynamic;
+   Sec_Stack_Dynamic : constant Boolean := Sec_Stack_Percentage = Dynamic;
    --  Convenient Boolean for testing for dynamic secondary stack
 
    function Default_Stack_Size return Size_Type;