PowerAda Tasking Considerations

From OC Systems Wiki!
Jump to: navigation, search

The RM95 leaves several tasking issues up to individual implementations. The following section explains how these issues apply to programs compiled with the PowerAda compiler.


Tasks are mapped as threads. Therefore, AIX or Linux schedules Ada tasks in the same manner as it schedules other threads/processes. Note that AIX fixed priorities are only available if the program is being run with root authority.

Portability Considerations

If you want your programs that use tasking to be completely portable, arrange your tasks so that only one task is ready to be run at any one time and all other tasks are blocked, waiting for some event. This simple tasking model should be compatible with the tasking system provided by any validated Ada compiler.

How Delay Statements Affect Tasks

delay statements are preemptive. Once a task executes a delay statement, it will be rescheduled some time after the delay expires, depending on the priority of other tasks in the system. If it has the highest priority of any task, it will be the next task to run. delay statements are as accurate as the AIX pthread_cond_timed_wait system call.

Task Identifiers

PowerAda supports task identifiers and attributes as detailed in Annex C.7 of the RM95.