sinfo.ads, sinfo.adb: Change Has_Pragma_CPU to Flag14 (Flag10 is standard field).
2010-10-18 Robert Dewar <dewar@adacore.com> * sinfo.ads, sinfo.adb: Change Has_Pragma_CPU to Flag14 (Flag10 is standard field). 2010-10-18 Robert Dewar <dewar@adacore.com> * s-stausa.adb, s-taprop-linux.adb, s-taprop-mingw.adb, s-tassta.ads: Minor reformatting. 2010-10-18 Robert Dewar <dewar@adacore.com> * exp_strm.adb (Build_Elementary_Input_Call): Check No_Default_Stream_Attributes. (Build_Elementary_Write_Call): Check No_Default_Stream_Attributes * s-rident.ads: Add restriction No_Default_Stream_Attributes Put restriction No_Allocators_After_Elaboration in alpha order From-SVN: r165626
This commit is contained in:
parent
8918fe18ab
commit
adcf6b3250
@ -1,3 +1,21 @@
|
||||
2010-10-18 Robert Dewar <dewar@adacore.com>
|
||||
|
||||
* sinfo.ads, sinfo.adb: Change Has_Pragma_CPU to Flag14 (Flag10 is
|
||||
standard field).
|
||||
|
||||
2010-10-18 Robert Dewar <dewar@adacore.com>
|
||||
|
||||
* s-stausa.adb, s-taprop-linux.adb, s-taprop-mingw.adb, s-tassta.ads:
|
||||
Minor reformatting.
|
||||
|
||||
2010-10-18 Robert Dewar <dewar@adacore.com>
|
||||
|
||||
* exp_strm.adb (Build_Elementary_Input_Call): Check
|
||||
No_Default_Stream_Attributes.
|
||||
(Build_Elementary_Write_Call): Check No_Default_Stream_Attributes
|
||||
* s-rident.ads: Add restriction No_Default_Stream_Attributes
|
||||
Put restriction No_Allocators_After_Elaboration in alpha order
|
||||
|
||||
2010-10-18 Jose Ruiz <ruiz@adacore.com>
|
||||
|
||||
* exp_ch9.adb (Expand_N_Task_Type_Declaration): Add field corresponding
|
||||
|
@ -29,6 +29,8 @@ with Namet; use Namet;
|
||||
with Nlists; use Nlists;
|
||||
with Nmake; use Nmake;
|
||||
with Opt; use Opt;
|
||||
with Restrict; use Restrict;
|
||||
with Rident; use Rident;
|
||||
with Rtsfind; use Rtsfind;
|
||||
with Sem_Aux; use Sem_Aux;
|
||||
with Sem_Util; use Sem_Util;
|
||||
@ -455,6 +457,8 @@ package body Exp_Strm is
|
||||
Lib_RE : RE_Id;
|
||||
|
||||
begin
|
||||
Check_Restriction (No_Default_Stream_Attributes, N);
|
||||
|
||||
-- Compute the size of the stream element. This is either the size of
|
||||
-- the first subtype or if given the size of the Stream_Size attribute.
|
||||
|
||||
@ -667,6 +671,8 @@ package body Exp_Strm is
|
||||
Libent : Entity_Id;
|
||||
|
||||
begin
|
||||
Check_Restriction (No_Default_Stream_Attributes, N);
|
||||
|
||||
-- Compute the size of the stream element. This is either the size of
|
||||
-- the first subtype or if given the size of the Stream_Size attribute.
|
||||
|
||||
|
@ -62,16 +62,17 @@ package System.Rident is
|
||||
No_Abort_Statements, -- (RM D.7(5), H.4(3))
|
||||
No_Access_Subprograms, -- (RM H.4(17))
|
||||
No_Allocators, -- (RM H.4(7))
|
||||
No_Anonymous_Allocators, -- Ada 2012
|
||||
No_Allocators_After_Elaboration, -- Ada 2012 (RM D.7(19.1/2))
|
||||
No_Anonymous_Allocators, -- Ada 2012 (RM H.4(8/1))
|
||||
No_Asynchronous_Control, -- (RM D.7(10))
|
||||
No_Calendar, -- GNAT
|
||||
No_Default_Stream_Attributes, -- Ada 2012 (RM 13.12.1(4/2))
|
||||
No_Delay, -- (RM H.4(21))
|
||||
No_Direct_Boolean_Operators, -- GNAT
|
||||
No_Dispatch, -- (RM H.4(19))
|
||||
No_Dispatching_Calls, -- GNAT
|
||||
No_Dynamic_Attachment, -- GNAT
|
||||
No_Dynamic_Priorities, -- (RM D.9(9))
|
||||
No_Allocators_After_Elaboration, -- Ada 2012
|
||||
No_Enumeration_Maps, -- GNAT
|
||||
No_Entry_Calls_In_Elaboration_Code, -- GNAT
|
||||
No_Entry_Queue, -- GNAT (Ravenscar)
|
||||
|
@ -263,10 +263,11 @@ package body System.Stack_Usage is
|
||||
Guard : constant Integer := 256;
|
||||
-- Guard space between the Current_Stack_Level'Address and the last
|
||||
-- allocated byte on the stack.
|
||||
begin
|
||||
if Analyzer.Top_Pattern_Mark /= 0 then
|
||||
-- Easiest and most accurate method: the top of the stack is known.
|
||||
|
||||
begin
|
||||
-- Easiest and most accurate method: the top of the stack is known.
|
||||
|
||||
if Analyzer.Top_Pattern_Mark /= 0 then
|
||||
Analyzer.Pattern_Size :=
|
||||
Stack_Size (Analyzer.Top_Pattern_Mark,
|
||||
To_Stack_Address (Current_Stack_Level'Address))
|
||||
@ -283,19 +284,23 @@ package body System.Stack_Usage is
|
||||
|
||||
declare
|
||||
Pattern : aliased Stack_Slots
|
||||
(1 .. Analyzer.Pattern_Size / Bytes_Per_Pattern);
|
||||
(1 .. Analyzer.Pattern_Size / Bytes_Per_Pattern);
|
||||
for Pattern'Address use Analyzer.Stack_Overlay_Address;
|
||||
|
||||
begin
|
||||
if System.Parameters.Stack_Grows_Down then
|
||||
for I in reverse Pattern'Range loop
|
||||
Pattern (I) := Analyzer.Pattern;
|
||||
for J in reverse Pattern'Range loop
|
||||
Pattern (J) := Analyzer.Pattern;
|
||||
end loop;
|
||||
|
||||
Analyzer.Bottom_Pattern_Mark :=
|
||||
To_Stack_Address (Pattern (Pattern'Last)'Address);
|
||||
|
||||
else
|
||||
for I in Pattern'Range loop
|
||||
Pattern (I) := Analyzer.Pattern;
|
||||
for J in Pattern'Range loop
|
||||
Pattern (J) := Analyzer.Pattern;
|
||||
end loop;
|
||||
|
||||
Analyzer.Bottom_Pattern_Mark :=
|
||||
To_Stack_Address (Pattern (Pattern'First)'Address);
|
||||
end if;
|
||||
@ -310,6 +315,7 @@ package body System.Stack_Usage is
|
||||
To_Stack_Address (Current_Stack_Level'Address));
|
||||
|
||||
if Stack_Used_When_Filling > Analyzer.Pattern_Size then
|
||||
|
||||
-- In this case, the known size of the stack is too small, we've
|
||||
-- already taken more than expected, so there's no possible
|
||||
-- computation
|
||||
|
@ -851,8 +851,8 @@ package body System.Task_Primitives.Operations is
|
||||
-- more appropriate.
|
||||
|
||||
if pthread_attr_setaffinity_np'Address = System.Null_Address then
|
||||
-- Nothing to do with the affinities if there is not the underlying
|
||||
-- support.
|
||||
|
||||
-- Nothing to do with the affinities if no underlying support
|
||||
|
||||
null;
|
||||
|
||||
@ -861,10 +861,8 @@ package body System.Task_Primitives.Operations is
|
||||
elsif T.Common.Base_CPU /= System.Multiprocessors.Not_A_Specific_CPU then
|
||||
declare
|
||||
CPU_Set : aliased cpu_set_t := (bits => (others => False));
|
||||
|
||||
begin
|
||||
CPU_Set.bits (Integer (T.Common.Base_CPU)) := True;
|
||||
|
||||
Result :=
|
||||
pthread_attr_setaffinity_np
|
||||
(Attributes'Access,
|
||||
@ -1340,10 +1338,8 @@ package body System.Task_Primitives.Operations is
|
||||
then
|
||||
declare
|
||||
CPU_Set : aliased cpu_set_t := (bits => (others => False));
|
||||
|
||||
begin
|
||||
CPU_Set.bits (Integer (Environment_Task.Common.Base_CPU)) := True;
|
||||
|
||||
Result :=
|
||||
pthread_setaffinity_np
|
||||
(Environment_Task.Common.LL.Thread,
|
||||
|
@ -955,6 +955,7 @@ package body System.Task_Primitives.Operations is
|
||||
-- Step 4: Handle pragma CPU and Task_Info
|
||||
|
||||
if T.Common.Base_CPU /= System.Multiprocessors.Not_A_Specific_CPU then
|
||||
|
||||
-- The CPU numbering in pragma CPU starts at 1 while the subprogram
|
||||
-- to set the affinity starts at 0, therefore we must substract 1.
|
||||
|
||||
@ -1116,9 +1117,10 @@ package body System.Task_Primitives.Operations is
|
||||
-- The CPU numbering in pragma CPU starts at 1 while the subprogram
|
||||
-- to set the affinity starts at 0, therefore we must substract 1.
|
||||
|
||||
Result := SetThreadIdealProcessor
|
||||
(Environment_Task.Common.LL.Thread,
|
||||
ProcessorId (Environment_Task.Common.Base_CPU) - 1);
|
||||
Result :=
|
||||
SetThreadIdealProcessor
|
||||
(Environment_Task.Common.LL.Thread,
|
||||
ProcessorId (Environment_Task.Common.Base_CPU) - 1);
|
||||
pragma Assert (Result = 1);
|
||||
end if;
|
||||
end Initialize;
|
||||
|
@ -184,15 +184,15 @@ package System.Tasking.Stages is
|
||||
-- Compiler interface only. Do not call from within the RTS.
|
||||
-- This must be called to create a new task.
|
||||
--
|
||||
-- Priority is the task's priority (assumed to be in the
|
||||
-- System.Any_Priority'Range)
|
||||
-- Priority is the task's priority (assumed to be in range of type
|
||||
-- System.Any_Priority)
|
||||
-- Size is the stack size of the task to create
|
||||
-- Task_Info is the task info associated with the created task, or
|
||||
-- Unspecified_Task_Info if none.
|
||||
-- CPU is the task affinity. We pass it as an Integer because the
|
||||
-- undefined value is not in the range of CPU_Range. Static range
|
||||
-- checks are performed when analyzing the pragma, and dynamic ones are
|
||||
-- performed before setting the affinity at run time.
|
||||
-- CPU is the task affinity. Passed as an Integer because the undefined
|
||||
-- value is not in the range of CPU_Range. Static range checks are
|
||||
-- performed when analyzing the pragma, and dynamic ones are performed
|
||||
-- before setting the affinity at run time.
|
||||
-- Relative_Deadline is the relative deadline associated with the created
|
||||
-- task by means of a pragma Relative_Deadline, or 0.0 if none.
|
||||
-- State is the compiler generated task's procedure body
|
||||
|
@ -1459,7 +1459,7 @@ package body Sinfo is
|
||||
pragma Assert (False
|
||||
or else NT (N).Nkind = N_Subprogram_Body
|
||||
or else NT (N).Nkind = N_Task_Definition);
|
||||
return Flag10 (N);
|
||||
return Flag14 (N);
|
||||
end Has_Pragma_CPU;
|
||||
|
||||
function Has_Pragma_Priority
|
||||
@ -4438,7 +4438,7 @@ package body Sinfo is
|
||||
pragma Assert (False
|
||||
or else NT (N).Nkind = N_Subprogram_Body
|
||||
or else NT (N).Nkind = N_Task_Definition);
|
||||
Set_Flag10 (N, Val);
|
||||
Set_Flag14 (N, Val);
|
||||
end Set_Has_Pragma_CPU;
|
||||
|
||||
procedure Set_Has_Pragma_Priority
|
||||
|
@ -1133,7 +1133,7 @@ package Sinfo is
|
||||
-- generate elaboration code, and non-preelaborated packages which do
|
||||
-- not generate elaboration code.
|
||||
|
||||
-- Has_Pragma_CPU (Flag10-Sem)
|
||||
-- Has_Pragma_CPU (Flag14-Sem)
|
||||
-- A flag present in N_Subprogram_Body and N_Task_Definition nodes to
|
||||
-- flag the presence of a CPU pragma in the declaration sequence (public
|
||||
-- or private in the task case).
|
||||
@ -4491,7 +4491,7 @@ package Sinfo is
|
||||
-- Is_Task_Master (Flag5-Sem)
|
||||
-- Was_Originally_Stub (Flag13-Sem)
|
||||
-- Has_Relative_Deadline_Pragma (Flag9-Sem)
|
||||
-- Has_Pragma_CPU (Flag10-Sem)
|
||||
-- Has_Pragma_CPU (Flag14-Sem)
|
||||
|
||||
------------------------------
|
||||
-- Parameterized Expression --
|
||||
@ -4975,7 +4975,7 @@ package Sinfo is
|
||||
-- Has_Task_Info_Pragma (Flag7-Sem)
|
||||
-- Has_Task_Name_Pragma (Flag8-Sem)
|
||||
-- Has_Relative_Deadline_Pragma (Flag9-Sem)
|
||||
-- Has_Pragma_CPU (Flag10-Sem)
|
||||
-- Has_Pragma_CPU (Flag14-Sem)
|
||||
|
||||
--------------------
|
||||
-- 9.1 Task Item --
|
||||
@ -8324,7 +8324,7 @@ package Sinfo is
|
||||
(N : Node_Id) return Boolean; -- Flag17
|
||||
|
||||
function Has_Pragma_CPU
|
||||
(N : Node_Id) return Boolean; -- Flag10
|
||||
(N : Node_Id) return Boolean; -- Flag14
|
||||
|
||||
function Has_Pragma_Priority
|
||||
(N : Node_Id) return Boolean; -- Flag6
|
||||
@ -9275,7 +9275,7 @@ package Sinfo is
|
||||
(N : Node_Id; Val : Boolean := True); -- Flag17
|
||||
|
||||
procedure Set_Has_Pragma_CPU
|
||||
(N : Node_Id; Val : Boolean := True); -- Flag10
|
||||
(N : Node_Id; Val : Boolean := True); -- Flag14
|
||||
|
||||
procedure Set_Has_Pragma_Priority
|
||||
(N : Node_Id; Val : Boolean := True); -- Flag6
|
||||
|
Loading…
Reference in New Issue
Block a user