Ada Reference ManualLegal Information
Contents   Index   References   Search   Previous   Next 

D.7 Tasking Restrictions

1
This clause defines restrictions that can be used with a pragma Restrictions (see 13.12) to facilitate the construction of highly efficient tasking run-time systems.

Static Semantics

2
The following restriction_identifiers are language defined: 
3
No_Task_Hierarchy 

All (nonenvironment) tasks depend directly on the environment task of the partition.
4/2
No_Nested_Finalization

Objects of a type that needs finalization (see 7.6) and access types that designate a type that needs finalization shall be declared only at library level. 
5
No_Abort_Statements

There are no abort_statements, and there are no calls on Task_Identification.Abort_Task.
6
No_Terminate_Alternatives

There are no selective_accepts with terminate_alternatives.
7
No_Task_Allocators

There are no allocators for task types or types containing task subcomponents.
8
No_Implicit_Heap_Allocations

There are no operations that implicitly require heap storage allocation to be performed by the implementation. The operations that implicitly require heap storage allocation are implementation defined. 
9/2
No_Dynamic_Priorities 

There are no semantic dependences on the package Dynamic_Priorities, and no occurrences of the attribute Priority.
10/2
No_Dynamic_Attachment

There is no call to any of the operations defined in package Interrupts (Is_Reserved, Is_Attached, Current_Handler, Attach_Handler, Exchange_Handler, Detach_Handler, and Reference).
10.1/2
  No_Local_Protected_Objects

Protected objects shall be declared only at library level.
10.2/2
  No_Local_Timing_Events

Timing_Events shall be declared only at library level.
10.3/2
  No_Protected_Type_Allocators

There are no allocators for protected types or types containing protected type subcomponents.
10.4/2
  No_Relative_Delay

There are no delay_relative_statements.
10.5/2
  No_Requeue_Statements

There are no requeue_statements.
10.6/2
  No_Select_Statements

There are no select_statements.
10.7/2
  No_Specific_Termination_Handlers

There are no calls to the Set_Specific_Handler and Specific_Handler subprograms in Task_Termination.
10.8/2
  Simple_Barriers 

The Boolean expression in an entry barrier shall be either a static Boolean expression or a Boolean component of the enclosing protected object.
11
The following restriction_parameter_identifiers are language defined: 
12
Max_Select_Alternatives

Specifies the maximum number of alternatives in a selective_accept.
13
Max_Task_Entries 

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.
14
Max_Protected_Entries 

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.

Dynamic Semantics

15/2
The following restriction_identifier is language defined:
15.1/2
  No_Task_Termination

All tasks are non-terminating. It is implementation-defined what happens if a task attempts to terminate. If there is a fall-back handler (see C.7.3) set for the partition it should be called when the first task attempts to terminate. 
16
The following restriction_parameter_identifiers are language defined: 
17/1
Max_Storage_At_Blocking

Specifies the maximum portion (in storage elements) of a task's Storage_Size that can be retained by a blocked task. If an implementation chooses to detect a violation of this restriction, Storage_Error should be raised; otherwise, the behavior is implementation defined. 
18/1
Max_Asynchronous_Select_Nesting

Specifies the maximum dynamic nesting level of asynchronous_selects. A value of zero prevents the use of any asynchronous_select and, if a program contains an asynchronous_select, it is illegal. If an implementation chooses to detect a violation of this restriction for values other than zero, Storage_Error should be raised; otherwise, the behavior is implementation defined. 
19/1
Max_Tasks 
Specifies the maximum number of task creations that may be executed over the lifetime of a partition, not counting the creation of the environment task. A value of zero prevents any task creation and, if a program contains a task creation, it is illegal. If an implementation chooses to detect a violation of this restriction, Storage_Error should be raised; otherwise, the behavior is implementation defined. 
19.1/2
  Max_Entry_Queue_Length

Max_Entry_Queue_Length defines the maximum number of calls that are queued on an entry. Violation of this restriction results in the raising of Program_Error at the point of the call or requeue.
20
It is implementation defined whether the use of pragma Restrictions results in a reduction in executable program size, storage requirements, or execution time. If possible, the implementation should provide quantitative descriptions of such effects for each restriction.

Implementation Advice

21
When feasible, the implementation should take advantage of the specified restrictions to produce a more efficient implementation.
NOTES
22
34  The above Storage_Checks can be suppressed with pragma Suppress. 

Contents   Index   References   Search   Previous   Next 
Ada-Europe Sponsored by Ada-Europe