Supplementing Generated Ada : Synchronization of Primitive Activities : Tasks

Tasks

The task mechanism allows you to integrate continuous or synchronized code into the primitive activity. You do not have to define the Ada task yourself, it is defined by the Code Generator. You specify the body of the task within the procedure template, which is generated in the user_activities file.

A task activity is an Ada task that executes concurrently with the rest of the system. It can delay itself, wait for events, and perform continuous calculations. When the task is executed, however, the rest of the code is suspended. To remedy this situation, synchronization points may be defined to allow the rescheduling of other tasks or the control code (main task) to proceed and the actions stop and suspend to take effect. If your procedure returns, the stop_activity event is generated.