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: a07f3367d7,229eda63f0d80a47 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!35g2000prt.googlegroups.com!not-for-mail From: Ed Falis Newsgroups: comp.lang.ada Subject: Re: Q: Profiles Date: Fri, 5 Nov 2010 16:11:37 -0700 (PDT) Organization: http://groups.google.com Message-ID: <35bf03b0-b251-4e14-b0cb-d8cec31b7380@35g2000prt.googlegroups.com> References: <4cd3e506$0$6992$9b4e6d93@newsspool4.arcor-online.net> <4cd47014$0$6989$9b4e6d93@newsspool4.arcor-online.net> NNTP-Posting-Host: 72.74.240.221 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1288998697 21647 127.0.0.1 (5 Nov 2010 23:11:37 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 5 Nov 2010 23:11:37 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: 35g2000prt.googlegroups.com; posting-host=72.74.240.221; posting-account=AbUV6AoAAABCszcq2uwr3Y_xpLTcXcln User-Agent: G2/1.0 X-HTTP-UserAgent: Opera/9.80 (X11; Linux i686; U; en) Presto/2.6.30 Version/10.63,gzip(gfe) Xref: g2news2.google.com comp.lang.ada:16270 Date: 2010-11-05T16:11:37-07:00 List-Id: On Nov 5, 5:28=A0pm, "Vinzent Hoefler" wrote: > 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. =A0But 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. Se= e GNAT RM: > > |The above set is a superset of the restrictions provided by pragma Profi= le (Restricted), > |it includes six additional restrictions (Simple_Barriers, No_Select_Stat= ements, > |No_Calendar, No_Implicit_Heap_Allocations, No_Relative_Delay and No_Task= _Termination). > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0^^^^^^^^^^^^^^^^^^^^= ^^^ > |This means that pragma Profile (Ravenscar), like the pragma Profile (Res= tricted), > |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, m= ore efficient > version" as soon as the proper set of restrictions is met, no matter if t= hey are given > in a "pragma Profile (...)" or as an explicit list of "pragma Restriction= s (...)". > > 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 pro= gram. ;) > > Vinzent. > > -- > There is no signature. The --RTS=3D switch for gnatmake or --config=3D,,,, switch to gprconfig is your friend. You generally would need to designate the run-time library through one of these mechanisms. pragma Profile (Ravenscar) will remove some overhead, but not as much as the former in versions of GNAT that support the specialized libraries. As far as termination goes, it's erroneous as you stated, but there are a variety of unusual ways to terminate tasks, typically being system calls. - Ed