Getting Started with M68K Ada: Ada 95 Compilation System for the Motorola M68000 Family | ||
---|---|---|
Prev | Chapter 3. Real-Time Programs | Next |
Programs that are not restricted to the Ravenscar Profile may also use the predefined packages Ada.Asynchronous_Task_Control, Ada.Dynamic_Priorities, Ada.Synchronous_Task_Control and Ada.Task_Identification.
The function Current_Task
allows a task to get
an identifier for itself. This identifier may then be used in calls the
the subprograms in Ada.Asynchronous_Task_Control, which
allow a task to be placed on hold, or to continue. Tasks that are on hold
consume no CPU time but do retain their state.
The package Ada.Task_Identification allows a task to be aborted. In M68K Ada this places the task in a state from which it may be restarted using the subprograms in XGC.Tasking.Stages.
The base priority of any task (including the current task) may be requested or changed using the package Ada.Dynamic_Priorities.
The implementation-defined package Ada.Periodic_Tasks allows periodic tasks to be given a period and then run without using the delay statement.
The implementation-defined package Ada.Task_Deadlines allows periodic tasks to be given a deadline that can be updated on each iteration. If a task fails to meet a hard deadline, then the program fails with a status that indicates the deadline has been missed.