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,229eda63f0d80a47 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "Vinzent Hoefler" Newsgroups: comp.lang.ada Subject: Re: Q: Profiles Date: Fri, 05 Nov 2010 22:28:47 +0100 Message-ID: References: <4cd3e506$0$6992$9b4e6d93@newsspool4.arcor-online.net> <4cd47014$0$6989$9b4e6d93@newsspool4.arcor-online.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit X-Trace: individual.net t65Ofek76IToW+R8Yk/khw+7hJkmsGYM+iTgikXodv2w+mTdqU Cancel-Lock: sha1:HK/l6j3olIM8ykaPL59MosCPr74= User-Agent: Opera Mail/10.63 (Win32) Xref: g2news2.google.com comp.lang.ada:16264 Date: 2010-11-05T22:28:47+01:00 List-Id: On Fri, 05 Nov 2010 21:59:00 +0100, Georg Bauhaus wrote: > On 11/5/10 9:14 PM, Vinzent Hoefler wrote: >> On Fri, 05 Nov 2010 12:05:42 +0100, Georg Bauhaus wrote: >> >>> The Ravenscar profile (and the Restricted profile in GNAT) >>> assume we want our tasks to run forever. Programs will be >>> supported by a lean and efficient run-time. >>> >>> What if I just want the lean and efficient Ravenscar run-time >>> but do want my tasks to terminate? >> >> I'd suggest to use the appropriate list of Restriction pragmas then. > > I think I need to place a pragma Profile (Ravenscar) > or (Restricted) (in the case of GNAT) to make the compiler pick > the desired run-time. But then tasks won't terminate. If you can stick to GNAT only, this isn't true. "No_Task_Termination" is an additional restriction for the Ravenscar profile which isn't in the original set. See GNAT RM: |The above set is a superset of the restrictions provided by pragma Profile (Restricted), |it includes six additional restrictions (Simple_Barriers, No_Select_Statements, |No_Calendar, No_Implicit_Heap_Allocations, No_Relative_Delay and No_Task_Termination). ^^^^^^^^^^^^^^^^^^^^^^^ |This means that pragma Profile (Ravenscar), like the pragma Profile (Restricted), |automatically causes the use of a simplified, more efficient version of the tasking |run-time system. Maybe I am wrong, but I would expect the binder to use the "simplified, more efficient version" as soon as the proper set of restrictions is met, no matter if they are given in a "pragma Profile (...)" or as an explicit list of "pragma Restrictions (...)". And BTW, the "tasks won't terminate" is probably not true in its literal sense, it's just erroneous behaviour if they do in a Ravenscar profile restricted program. ;) Vinzent. -- There is no signature.