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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,d495ab2e69ad1962 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!wn14feed!worldnet.att.net!bgtnsc04-news.ops.worldnet.att.net.POSTED!53ab2750!not-for-mail Newsgroups: comp.lang.ada From: anon@anon.org (anon) Subject: Re: Ravenscar-compliant bounded buffer Reply-To: anon@anon.org (anon) References: <1188914005.607732.277400@57g2000hsv.googlegroups.com> <1189194299.326741.151840@50g2000hsm.googlegroups.com> X-Newsreader: IBM NewsReader/2 2.0 Message-ID: Date: Sat, 08 Sep 2007 00:16:51 GMT NNTP-Posting-Host: 12.65.162.252 X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc04-news.ops.worldnet.att.net 1189210611 12.65.162.252 (Sat, 08 Sep 2007 00:16:51 GMT) NNTP-Posting-Date: Sat, 08 Sep 2007 00:16:51 GMT Organization: AT&T Worldnet Xref: g2news2.google.com comp.lang.ada:1808 Date: 2007-09-08T00:16:51+00:00 List-Id: To use tasking you have to build that code as well. Unless you use the Normal run-time system for the non-Pro version compiler. And "No_Run_time" will kill that process. And Yes, if you use the "No_Run_Time" prgama you could build a device driver for some hardware. A better idea is to build your own RTS. You would think that in 15 years of GNAT you might see a few new RTS or at least one or two doctoral types of RTS, but nothing. The only thing you see is mostly ports of GNAT to a new hardware or operating system. >Note that this requires the C run-time instead. I could of wrote the code in Assembly bypassing the "C run-time" but for a demonstration it was not needed. And the assembly package might be smaller and faster. Plus if you look at GNAT.IO package you will see that it calls some routines that are written in C which source code is in file "cio.c" that even Ada.Text_IO uses. Actually GNAT uses the C's "fprintf" instead of "prinf". Note: GNAT uses the GCC "C Run-Time" package to make it easier to be installed on a number of different operating systems and processors. If you look around in the other Ada packages and C source code files you will see just how the tasking is done which is basically just a number of OS "thread" routines calls linking to Ada by way of C. And the GNU/GPL GNAT Ada is just a frontend compiler to the GCC. If you look at the source code "Back_end.adb" you will see a link to a C coded procedure called gigi (gnat-to-gcc) which calls the C "Run-Time" compiler. The C "Run-Time" compiler then converts the GNAT C generated code to the object modules. For GNAT and most other Ada systems there is no Ada only "Run-Time System". Most uses the "C library" packages, some may use assembly or JAVA or even Pascal library packages for its RTS. In <1189194299.326741.151840@50g2000hsm.googlegroups.com>, Maciej Sobczak writes: >On 7 Wrz, 13:56, a...@anon.org (anon) wrote: > >> 2) Is defined in the GNAT manual as an obsolete feature, that is >> using the "pragma No_Run_Time ;", but still works. In this >> version, the user must supply the RTS subsystem that the >> program requires. > >Interesting, but IO is easy. What about multitasking? What kind of RTS >needs to be supplied for tasks to work correcly? > > >> /* ----------- */ >> /* put_line.c */ >> /* ----------- */ >> #include >> >> /* put_line -- run-time subsystem procedure */ >> void put_line ( value ) >> char * value ; >> { >> printf ( "%s\n", value ) ; >> } >> /* --eof-- */ > >Note that this requires the C run-time instead. It might be smaller/ >faster, but still it is not No_Run_Time in the strict sense. You might >need to really use the basic OS services directly to claim "no run- >time" program. Or even forget about OS, the No_Run_Time option is most >likely intended for those who program hardware directly. > >> If your in class this might turn into >> an extra assignment or it could be used in a later course. > >No, I'm not "in class". :-) > >-- >Maciej Sobczak >http://www.msobczak.com/ >