Re: Ravenscar - program termination



Niklas Holsti <niklas.holsti@xxxxxxxxxxxxx> writes:

matteo.bordin@xxxxxxxxx wrote:
[ snip ]
On real-time kernels supporting the Ravenscar profile, even the main
procedure must contain an infinite loop.

I don't think that is an Ada requirement. As I understand it, under the
Ravenscar profile the environment task is the master of all application
tasks, so it will await their termination; since they never terminate,
neither does the environment task (RM 2005 10.2(25)), even if the main
procedure terminates and returns to the body of the environment task.

Then what would happen if there were no tasks other than the environment
task?

I have seen a Ravenscar Ada implementation that requires the main
procedure to end with an infinite loop, but I think that is a
non-standard requirement.

Why so? The RM wording says "all tasks", and that includes the env
task.

- Bob
.



Relevant Pages

  • Re: Ravenscar - program termination
    ... I don't think that is an Ada requirement. ... As I understand it, under the Ravenscar profile the environment task is the master of all application tasks, so it will await their termination; since they never terminate, neither does the environment task ), even if the main procedure terminates and returns to the body of the environment task. ... I have seen a Ravenscar Ada implementation that requires the main procedure to end with an infinite loop, but I think that is a non-standard requirement. ...
    (comp.lang.ada)
  • Re: Ravenscar - program termination
    ... procedure must contain an infinite loop. ... Ravenscar profile the environment task is the master of all application ... If a Ravenscar program has no tasks then the main procedure must not terminate, ...
    (comp.lang.ada)
  • Re: Finalization of static package variables
    ... Adam Beneschan wrote: ... 10.2says, "When the environment task completes..., it ... the task termination would need to ... termination must come *first*, before object finalization. ...
    (comp.lang.ada)