DocAda(tm) is a productivity tool of KSCE

Prev | Up | Next | Back | Forward
About DocAda Light: Preface / Preliminary / Help / TOC / Copyright
DocAda Online at the Ada Home: Complete RM95 / Updates / News

D.11 Asynchronous Task Control

This clause introduces a language-defined package to do asynchronous suspend/resume on tasks. It uses a conceptual held priority value to represent the task's held state.

Static Semantics

The following language-defined library package exists:

   
       with Ada.Task_Identification;
       package Ada.Asynchronous_Task_Control is
         procedure Hold(T : in Ada.Task_Identification.Task_ID);
         procedure Continue(T : in Ada.Task_Identification.Task_ID);
         function Is_Held(T : Ada.Task_Identification.Task_ID)
          return Boolean;
       end Ada.Asynchronous_Task_Control;

Dynamic Semantics

After the Hold operation has been applied to a task, the task becomes held. For each processor there is a conceptual idle task, which is always ready. The base priority of the idle task is below System.Any_Priority'First. The held priority is a constant of the type integer whose value is below the base priority of the idle task.

The Hold operation sets the state of T to held. For a held task: the task's own base priority does not constitute an inheritance source (see D.1), and the value of the held priority is defined to be such a source instead.

The Continue operation resets the state of T to not-held; T's active priority is then reevaluated as described in D.1. This time, T's base priority is taken into account.

The Is_Held function returns True if and only if T is in the held state.

As part of these operations, a check is made that the task identified by T is not terminated. Tasking_Error is raised if the check fails. Program_Error is raised if the value of T is Null_Task_ID.

Erroneous Execution

If any operation in this package is called with a parameter T that specifies a task object that no longer exists, the execution of the program is erroneous.

Implementation Permissions

An implementation need not support Asynchronous_Task_Control if it is infeasible to support it in the target environment.

About DocAda Light: Preface / Preliminary / Help / TOC / Copyright
DocAda Online at the Ada Home: Complete RM95 / Updates / News
Prev | Up | Next | Back | Forward


Copyright © 1994-1997 by Kempe Software Capital Enterprises. All Rights Reserved. For comments on this DocAda(tm) hypertext document, please write to KSCE, at docada@ksce.com