===================================================================
@@ -1194,8 +1194,10 @@
Restricted_Profile_Cached := True;
declare
- R : Restriction_Flags renames Profile_Info (Restricted).Set;
- V : Restriction_Values renames Profile_Info (Restricted).Value;
+ R : Restriction_Flags renames
+ Profile_Info (Restricted_Tasking).Set;
+ V : Restriction_Values renames
+ Profile_Info (Restricted_Tasking).Value;
begin
for J in R'Range loop
if R (J)
===================================================================
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
+-- Copyright (C) 1992-2016, 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- --
@@ -424,10 +424,10 @@
-- executing this code only if needed.
function Restricted_Profile return Boolean;
- -- Tests if set of restrictions corresponding to Profile (Restricted) is
- -- currently in effect (set by pragma Profile, or by an appropriate set of
- -- individual Restrictions pragmas). Returns True only if all the required
- -- restrictions are set.
+ -- Tests if set of restrictions corresponding to Restricted_Tasking profile
+ -- is currently in effect (set by pragma Profile, or by an appropriate set
+ -- of individual Restrictions pragmas). Returns True only if all the
+ -- required restrictions are set.
procedure Set_Hidden_Part_In_SPARK (Loc1, Loc2 : Source_Ptr);
-- Insert a new hidden region range in the SPARK hides table. The effect
===================================================================
@@ -378,15 +378,19 @@
type Profile_Name is
(No_Profile,
No_Implementation_Extensions,
+ Restricted_Tasking,
+ Restricted,
Ravenscar,
- GNAT_Extended_Ravenscar,
- Restricted);
+ GNAT_Extended_Ravenscar);
-- Names of recognized profiles. No_Profile is used to indicate that a
-- restriction came from pragma Restrictions[_Warning], as opposed to
- -- pragma Profile[_Warning].
+ -- pragma Profile[_Warning]. Restricted_Tasking is a non-user profile that
+ -- contaings the minimal set of restrictions to trigger the user of the
+ -- restricted tasking runtime. Restricted is the corresponding user profile
+ -- that also restrict protected types.
subtype Profile_Name_Actual is Profile_Name
- range No_Implementation_Extensions .. Restricted;
+ range No_Implementation_Extensions .. GNAT_Extended_Ravenscar;
-- Actual used profile names
type Profile_Data is record
@@ -422,6 +426,37 @@
Value =>
(others => 0)),
+ -- Restricted_Tasking Profile
+
+ Restricted_Tasking =>
+
+ -- Restrictions for Restricted_Tasking profile
+
+ (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,
+ others => False),
+
+ -- Value settings for Restricted_Tasking profile
+
+ Value =>
+ (Max_Asynchronous_Select_Nesting => 0,
+ Max_Select_Alternatives => 0,
+ Max_Task_Entries => 0,
+ others => 0)),
+
-- Restricted Profile
Restricted =>