Re: Ravenscar - program termination
- From: Niklas Holsti <niklas.holsti@xxxxxxxxxxxxx>
- Date: Wed, 31 Jan 2007 09:53:53 +0200
Robert A Duff wrote:
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?
OK, good point. If a Ravenscar program has no tasks (other than the environment task) then the main procedure must not terminate, agreed. (Also there must *be* a main procedure.)
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.
If I remember correctly the documentation for that implementation said that it was a non-standard requirement. The reason given for this requirement was very implementation-dependent: the main procedure became the "idle task" for the scheduler, which required that the idle task be always "ready", therefore the main procedure was not allowed to terminate. But of course the documentation may have been wrong to say it was non-standard.
If Ravenscar really requires that the main procedure be non-terminating, I'm happy to learn that. From a very formal point of view I guess this requirement means that the kernel need not implement "await for task termination" even in the environment task.
--
Niklas Holsti
Tidorum Ltd
niklas holsti tidorum fi
. @ .
.
- Follow-Ups:
- Re: Ravenscar - program termination
- From: Ludovic Brenta
- Re: Ravenscar - program termination
- References:
- Ravenscar - program termination
- From: Maciej Sobczak
- Re: Ravenscar - program termination
- From: Ludovic Brenta
- Re: Ravenscar - program termination
- From: Maciej Sobczak
- Re: Ravenscar - program termination
- From: matteo . bordin
- Re: Ravenscar - program termination
- From: Niklas Holsti
- Re: Ravenscar - program termination
- From: Robert A Duff
- Ravenscar - program termination
- Prev by Date: Re: Reading Float Data from a binary file into ada
- Next by Date: AW: How come Ada isn't more popular?
- Previous by thread: Re: Ravenscar - program termination
- Next by thread: Re: Ravenscar - program termination
- Index(es):
Relevant Pages
|