aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/libgnat
diff options
context:
space:
mode:
authorSteve Baird <baird@adacore.com>2020-02-19 16:27:47 -0800
committerPierre-Marie de Rodat <derodat@adacore.com>2020-06-08 03:51:11 -0400
commita998e58bf019c7174a7480fc4d46ec9fcbc4cd92 (patch)
tree46d3127104e32fd2d2fc898284dd539933c5e7fc /gcc/ada/libgnat
parent4b8c2c4ba3566f8dd6d256e4b93321410782a0b4 (diff)
downloadgcc-a998e58bf019c7174a7480fc4d46ec9fcbc4cd92.zip
gcc-a998e58bf019c7174a7480fc4d46ec9fcbc4cd92.tar.gz
gcc-a998e58bf019c7174a7480fc4d46ec9fcbc4cd92.tar.bz2
[Ada] Implement AI12-0291 (Jorvik profile)
2020-06-08 Steve Baird <baird@adacore.com> gcc/ada/ * libgnat/s-rident.ads: Add Jorvik to the Profile_Name enumeration type. Add an element for Jorvik to the array aggregate that is the initial value of the constant Profile_Info. * targparm.adb (Get_Target_Parameters): Handle "pragma Profile (Jorvik);" similarly to "pragma Profile (Ravenscar);". * snames.ads-tmpl: Declare Name_Jorvik Name_Id. Unlike Ravenscar, Jorvik is not a pragma name and has no corresponding element in the Pragma_Id enumeration type; this means that its declaration must not occur between those of First_Pragma_Name and Last_Pragma_Name. * sem_prag.adb (Analyze_Pragma): Add call to Set_Ravenscar_Profile for Jorvik, similar to the existing calls for Ravenscar and the GNAT Ravenscar variants.
Diffstat (limited to 'gcc/ada/libgnat')
-rw-r--r--gcc/ada/libgnat/s-rident.ads62
1 files changed, 62 insertions, 0 deletions
diff --git a/gcc/ada/libgnat/s-rident.ads b/gcc/ada/libgnat/s-rident.ads
index 73a0450..b7969fb 100644
--- a/gcc/ada/libgnat/s-rident.ads
+++ b/gcc/ada/libgnat/s-rident.ads
@@ -381,6 +381,7 @@ package System.Rident is
Restricted_Tasking,
Restricted,
Ravenscar,
+ Jorvik,
GNAT_Extended_Ravenscar,
GNAT_Ravenscar_EDF);
-- Names of recognized profiles. No_Profile is used to indicate that a
@@ -545,6 +546,67 @@ package System.Rident is
Max_Task_Entries => 0,
others => 0)),
+ Jorvik =>
+
+ -- Restrictions for Jorvik profile ..
+
+ -- Note: the table entries here only represent the
+ -- required restriction profile for Jorvik. The
+ -- full Jorvik profile also requires:
+
+ -- pragma Dispatching_Policy (FIFO_Within_Priorities);
+ -- pragma Locking_Policy (Ceiling_Locking);
+ -- pragma Detect_Blocking;
+
+ -- The differences between Ravenscar and Jorvik are
+ -- as follows:
+ -- 1) Ravenscar includes restriction Simple_Barriers;
+ -- Jorvik includes Pure_Barriers instead.
+ -- 2) The following 6 restrictions are included in
+ -- Ravenscar but not in Jorvik:
+ -- No_Implicit_Heap_Allocations
+ -- No_Relative_Delay
+ -- Max_Entry_Queue_Length => 1
+ -- Max_Protected_Entries => 1
+ -- No_Dependence => Ada.Calendar
+ -- No_Dependence => Ada.Synchronous_Barriers
+ --
+ -- The last of those 7 (i.e., No_Dep => Ada.Synch_Bars)
+ -- is not reflected here (see sem_prag.adb).
+
+ (Set =>
+ (No_Abort_Statements => True,
+ No_Asynchronous_Control => True,
+ No_Dynamic_Attachment => True,
+ No_Dynamic_Priorities => True,
+ No_Local_Protected_Objects => True,
+ No_Protected_Type_Allocators => True,
+ No_Requeue_Statements => True,
+ No_Task_Allocators => True,
+ No_Task_Attributes_Package => True,
+ No_Task_Hierarchy => True,
+ No_Terminate_Alternatives => True,
+ Max_Asynchronous_Select_Nesting => True,
+ Max_Select_Alternatives => True,
+ Max_Task_Entries => True,
+
+ -- plus these additional restrictions:
+
+ No_Local_Timing_Events => True,
+ No_Select_Statements => True,
+ No_Specific_Termination_Handlers => True,
+ No_Task_Termination => True,
+ Pure_Barriers => True,
+ others => False),
+
+ -- Value settings for Ravenscar (same as Restricted)
+
+ Value =>
+ (Max_Asynchronous_Select_Nesting => 0,
+ Max_Select_Alternatives => 0,
+ Max_Task_Entries => 0,
+ others => 0)),
+
GNAT_Extended_Ravenscar =>
-- Restrictions for GNAT_Extended_Ravenscar =