From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,7d5642dc1158588b X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news1.google.com!news.germany.com!feeder2.news.saunalahti.fi!feeder1.news.saunalahti.fi!newsfeed1.funet.fi!newsfeeds.funet.fi!uio.no!fi.sn.net!newsfeed1.fi.sn.net!news.song.fi!not-for-mail Date: Wed, 31 Jan 2007 09:53:53 +0200 From: Niklas Holsti User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20060628 Debian/1.7.8-1sarge7.1 X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Ravenscar - program termination References: <87zm81txs1.fsf@ludovic-brenta.org> <1170167084.668967.110840@s48g2000cws.googlegroups.com> <45bf97d4$0$22524$39db0f71@news.song.fi> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <45c0499c$0$22512$39db0f71@news.song.fi> Organization: TDC Song Internet Services NNTP-Posting-Host: laku61.adsl.netsonic.fi X-Trace: 1170229660 news.song.fi 22512 81.17.205.61:32790 X-Complaints-To: abuse@song.fi Xref: g2news2.google.com comp.lang.ada:8757 Date: 2007-01-31T09:53:53+02:00 List-Id: Robert A Duff wrote: > Niklas Holsti 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 . @ .