comp.lang.ada
 help / color / mirror / Atom feed
From: Niklas Holsti <niklas.holsti@nospam.please>
Subject: Re: Ravenscar - program termination
Date: Wed, 31 Jan 2007 09:53:53 +0200
Date: 2007-01-31T09:53:53+02:00	[thread overview]
Message-ID: <45c0499c$0$22512$39db0f71@news.song.fi> (raw)
In-Reply-To: <wccd54w8dfh.fsf@shell01.TheWorld.com>

Robert A Duff wrote:
> Niklas Holsti <niklas.holsti@nospam.please> writes:
> 
> 
>>matteo.bordin@gmail.com 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
       .      @       .



  reply	other threads:[~2007-01-31  7:53 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-29 16:34 Ravenscar - program termination Maciej Sobczak
2007-01-29 19:53 ` Ludovic Brenta
2007-01-30  8:09   ` Maciej Sobczak
2007-01-30  9:37     ` Markus E Leypold
2007-01-30 17:48       ` Jeffrey R. Carter
2007-01-31  9:01       ` Maciej Sobczak
2007-01-31  9:59         ` Ludovic Brenta
2007-01-30 14:24     ` matteo.bordin
2007-01-30 19:15       ` Niklas Holsti
2007-01-30 20:30         ` Robert A Duff
2007-01-31  7:53           ` Niklas Holsti [this message]
2007-01-31  8:12             ` Ludovic Brenta
2007-01-31  8:59               ` Niklas Holsti
2007-01-31 18:02               ` Jeffrey R. Carter
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox