Next: , Previous: Pragma Pure_Function, Up: Implementation Defined Pragmas


Pragma Ravenscar

Syntax:

     pragma Ravenscar;

A configuration pragma that establishes the following set of restrictions:

No_Abort_Statements
[RM D.7] There are no abort_statements, and there are no calls to Task_Identification.Abort_Task.
No_Select_Statements
There are no select_statements.
No_Task_Hierarchy
[RM D.7] All (non-environment) tasks depend directly on the environment task of the partition.
No_Task_Allocators
[RM D.7] There are no allocators for task types or types containing task subcomponents.
No_Dynamic_Priorities
[RM D.7] There are no semantic dependencies on the package Dynamic_Priorities.
No_Terminate_Alternatives
[RM D.7] There are no selective_accepts with terminate_alternatives
No_Dynamic_Interrupts
There are no semantic dependencies on Ada.Interrupts.
No_Implicit_Heap_Allocations
[RM D.7] No constructs are allowed to cause implicit heap allocation
No_Protected_Type_Allocators
There are no allocators for protected types or types containing protected subcomponents.
No_Local_Protected_Objects
Protected objects and access types that designate such objects shall be declared only at library level.
No_Requeue
Requeue statements are not allowed.
No_Calendar
There are no semantic dependencies on the package Ada.Calendar.
No_Relative_Delay
There are no delay_relative_statements.
No_Task_Attributes
There are no semantic dependencies on the Ada.Task_Attributes package and there are no references to the attributes Callable and Terminated [RM 9.9].
Boolean_Entry_Barriers
Entry barrier condition expressions shall be boolean objects which are declared in the protected type which contains the entry.
Max_Asynchronous_Select_Nesting = 0
[RM D.7] Specifies the maximum dynamic nesting level of asynchronous_selects. A value of zero prevents the use of any asynchronous_select.
Max_Task_Entries = 0
[RM D.7] Specifies the maximum number of entries per task. The bounds of every entry family of a task unit shall be static, or shall be defined by a discriminant of a subtype whose corresponding bound is static. A value of zero indicates that no rendezvous are possible. For the Ravenscar pragma, the value of Max_Task_Entries is always 0 (zero).
Max_Protected_Entries = 1
[RM D.7] Specifies the maximum number of entries per protected type. The bounds of every entry family of a protected unit shall be static, or shall be defined by a discriminant of a subtype whose corresponding bound is static. For the Ravenscar pragma the value of Max_Protected_Entries is always 1.
Max_Select_Alternatives = 0
[RM D.7] Specifies the maximum number of alternatives in a selective_accept. For the Ravenscar pragma the value is always 0.
No_Task_Termination
Tasks which terminate are erroneous.
No_Entry_Queue
No task can be queued on a protected entry. Note that this restrictions is checked at run time. The violation of this restriction generates a Program_Error exception.

This set of restrictions corresponds to the definition of the “Ravenscar Profile” for limited tasking, devised and published by the International Real-Time Ada Workshop, 1997, and whose most recent description is available at ftp://ftp.openravenscar.org/openravenscar/ravenscar00.pdf.

The above set is a superset of the restrictions provided by pragma Restricted_Run_Time, it includes five additional restrictions (Boolean_Entry_Barriers, No_Select_Statements, No_Calendar, No_Relative_Delay and No_Task_Termination). This means that pragma Ravenscar, like the pragma Restricted_Run_Time, automatically causes the use of a simplified, more efficient version of the tasking run-time system.