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


Pragma Profile (Ravenscar)

Syntax:

     pragma Profile (Ravenscar);

A configuration pragma that 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.
plus the following set of restrictions:
Max_Entry_Queue_Length = 1
Defines the maximum number of calls that are queued on a (protected) entry. Note that this restrictions is checked at run time. Violation of this restriction results in the raising of Program_Error exception at the point of the call. For the Profile (Ravenscar) the value of Max_Entry_Queue_Length is always 1 and hence no task can be queued on a protected entry.
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 Profile (Ravenscar) the value of Max_Protected_Entries is always 1.
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 Profile (Ravenscar), the value of Max_Task_Entries is always 0 (zero).
No_Abort_Statements
[RM D.7] There are no abort_statements, and there are no calls to Task_Identification.Abort_Task.
No_Asynchronous_Control
[RM D.7] There are no semantic dependences on the package Asynchronous_Task_Control.
No_Calendar
There are no semantic dependencies on the package Ada.Calendar.
No_Dynamic_Attachment
There is no call to any of the operations defined in package Ada.Interrupts (Is_Reserved, Is_Attached, Current_Handler, Attach_Handler, Exchange_Handler, Detach_Handler, and Reference).
No_Dynamic_Priorities
[RM D.7] There are no semantic dependencies on the package Dynamic_Priorities.
No_Implicit_Heap_Allocations
[RM D.7] No constructs are allowed to cause implicit heap allocation.
No_Local_Protected_Objects
Protected objects and access types that designate such objects shall be declared only at library level.
No_Protected_Type_Allocators
There are no allocators for protected types or types containing protected subcomponents.
No_Relative_Delay
There are no delay_relative statements.
No_Requeue_Statements
Requeue statements are not allowed.
No_Select_Statements
There are no select_statements.
No_Task_Allocators
[RM D.7] There are no allocators for task types or types containing task subcomponents.
No_Task_Attributes_Package
There are no semantic dependencies on the Ada.Task_Attributes package.
No_Task_Hierarchy
[RM D.7] All (non-environment) tasks depend directly on the environment task of the partition.
No_Task_Termination
Tasks which terminate are erroneous.
Simple_Barriers
Entry barrier condition expressions shall be either static boolean expressions or boolean objects which are declared in the protected type which contains the entry.

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, and whose most recent description is available at ftp://ftp.openravenscar.org/openravenscar/ravenscar00.pdf.

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 has been approved by ISO/IEC/SC22/WG9 for inclusion in the next revision of the 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 respectively.

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 system.