Syntax:
pragma Profile (Ravenscar | Restricted | Rational | Jorvik | GNAT_Extended_Ravenscar | GNAT_Ravenscar_EDF );
This pragma is standard in Ada 2005, but is available in all earlier
versions of Ada as an implementation-defined pragma. This is a
configuration pragma that establishes a set of configuration pragmas
that depend on the argument. Ravenscar
is standard in Ada 2005.
Jorvik
is standard in Ada 202x.
The other possibilities (Restricted
, Rational
,
GNAT_Extended_Ravenscar
, GNAT_Ravenscar_EDF
)
are implementation-defined. GNAT_Extended_Ravenscar
is an alias for Jorvik
.
The set of configuration pragmas is defined in the following sections.
The Ravenscar
profile is standard in Ada 2005,
but is available in all earlier
versions of Ada as an implementation-defined pragma. This profile
establishes the following set of configuration pragmas:
Task_Dispatching_Policy (FIFO_Within_Priorities)
[RM D.2.2] Tasks are dispatched following a preemptive priority-ordered scheduling policy.
Locking_Policy (Ceiling_Locking)
[RM D.3] While tasks and interrupts execute a protected action, they inherit the ceiling priority of the corresponding protected object.
Detect_Blocking
This pragma forces the detection of potentially blocking operations within a protected operation, and to raise Program_Error if that happens.
plus the following set of restrictions:
Max_Entry_Queue_Length => 1
No task can be queued on a protected entry.
Max_Protected_Entries => 1
Max_Task_Entries => 0
No rendezvous statements are allowed.
No_Abort_Statements
No_Dynamic_Attachment
No_Dynamic_Priorities
No_Implicit_Heap_Allocations
No_Local_Protected_Objects
No_Local_Timing_Events
No_Protected_Type_Allocators
No_Relative_Delay
No_Requeue_Statements
No_Select_Statements
No_Specific_Termination_Handlers
No_Task_Allocators
No_Task_Hierarchy
No_Task_Termination
Simple_Barriers
The Ravenscar profile also includes the following restrictions that specify that there are no semantic dependencies on the corresponding predefined packages:
No_Dependence => Ada.Asynchronous_Task_Control
No_Dependence => Ada.Calendar
No_Dependence => Ada.Execution_Time.Group_Budget
No_Dependence => Ada.Execution_Time.Timers
No_Dependence => Ada.Task_Attributes
No_Dependence => System.Multiprocessors.Dispatching_Domains
This set of configuration pragmas and restrictions correspond to the
definition of the ’Ravenscar Profile’ for limited tasking, devised and
published by the International Real-Time Ada Workshop, 1997.
A description is also available at
‘http://www-users.cs.york.ac.uk/~burns/ravenscar.ps
’.
The original definition of the profile was revised at subsequent IRTAW
meetings. It has been included in the ISO
Guide for the Use of the Ada Programming Language in High Integrity Systems,
and was made part of the Ada 2005 standard.
The formal definition given by
the Ada Rapporteur Group (ARG) can be found in two Ada Issues (AI-249 and
AI-305) available at
‘http://www.ada-auth.org/cgi-bin/cvsweb.cgi/ais/ai-00249.txt
’ and
‘http://www.ada-auth.org/cgi-bin/cvsweb.cgi/ais/ai-00305.txt
’.
The above set is a superset of the restrictions provided by pragma
Profile (Restricted)
, it includes six additional restrictions
(Simple_Barriers
, No_Select_Statements
,
No_Calendar
, No_Implicit_Heap_Allocations
,
No_Relative_Delay
and No_Task_Termination
). This means
that pragma Profile (Ravenscar)
, like the pragma
Profile (Restricted)
,
automatically causes the use of a simplified,
more efficient version of the tasking run-time library.
Jorvik
is the new profile added to the Ada 202x draft standard,
previously implemented under the name GNAT_Extended_Ravenscar
.
The No_Implicit_Heap_Allocations
restriction has been replaced
by No_Implicit_Task_Allocations
and
No_Implicit_Protected_Object_Allocations
.
The Simple_Barriers
restriction has been replaced by
Pure_Barriers
.
The Max_Protected_Entries
, Max_Entry_Queue_Length
, and
No_Relative_Delay
restrictions have been removed.
Details on the rationale for Jorvik
and implications for use may be
found in A New Ravenscar-Based Profile by P. Rogers, J. Ruiz,
T. Gingold and P. Bernardi, in Reliable Software Technologies – Ada Europe 2017, Springer-Verlag Lecture Notes in Computer Science,
Number 10300.
This profile corresponds to the Ravenscar profile but using EDF_Across_Priority as the Task_Scheduling_Policy.
This profile corresponds to the GNAT restricted run time. It establishes the following set of restrictions:
No_Abort_Statements
No_Entry_Queue
No_Task_Hierarchy
No_Task_Allocators
No_Dynamic_Priorities
No_Terminate_Alternatives
No_Dynamic_Attachment
No_Protected_Type_Allocators
No_Local_Protected_Objects
No_Requeue_Statements
No_Task_Attributes_Package
Max_Asynchronous_Select_Nesting = 0
Max_Task_Entries = 0
Max_Protected_Entries = 1
Max_Select_Alternatives = 0
This set of restrictions causes the automatic selection of a simplified version of the run time that provides improved performance for the limited set of tasking functionality permitted by this set of restrictions.
The Rational profile is intended to facilitate porting legacy code that compiles with the Rational APEX compiler, even when the code includes non- conforming Ada constructs. The profile enables the following three pragmas:
pragma Implicit_Packing
pragma Overriding_Renamings
pragma Use_VADS_Size