From: anon@anon.org (anon)
Subject: Re: Ravenscar-compliant bounded buffer
Date: Sat, 08 Sep 2007 00:16:51 GMT
Date: 2007-09-08T00:16:51+00:00 [thread overview]
Message-ID: <TRlEi.505983$p47.38772@bgtnsc04-news.ops.worldnet.att.net> (raw)
In-Reply-To: 1189194299.326741.151840@50g2000hsm.googlegroups.com
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 <see.my.homepage@gmail.com> 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 <stdio.h>
>>
>> /* 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/
>
next prev parent reply other threads:[~2007-09-08 0:16 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-04 13:53 Ravenscar-compliant bounded buffer Maciej Sobczak
2007-09-05 3:00 ` Steve
2007-09-05 7:38 ` Maciej Sobczak
2007-09-06 4:04 ` Steve
2007-09-06 14:06 ` Robert A Duff
2007-09-06 15:36 ` Dmitry A. Kazakov
2007-09-07 2:36 ` Robert A Duff
2007-09-06 21:13 ` Maciej Sobczak
2007-09-07 2:41 ` Robert A Duff
2007-09-07 11:56 ` anon
2007-09-07 19:44 ` Maciej Sobczak
2007-09-08 0:16 ` anon [this message]
2007-09-08 1:19 ` Larry Kilgallen
2007-09-08 5:13 ` anon
2007-09-08 22:06 ` Larry Kilgallen
2007-09-09 2:17 ` anon
2007-09-09 12:07 ` Larry Kilgallen
2007-09-09 13:10 ` Markus E L
2007-09-11 2:44 ` Randy Brukardt
2007-09-08 11:50 ` Niklas Holsti
2007-09-08 12:01 ` Pascal Obry
2007-09-08 17:13 ` anon
2007-09-08 17:11 ` anon
2007-09-08 19:14 ` Markus E L
2007-09-09 14:54 ` anon
2007-09-09 16:01 ` Markus E L
2007-09-09 10:38 ` Gautier
2007-09-09 11:41 ` anon
2007-09-09 13:19 ` Markus E L
2007-09-09 13:52 ` Pascal Obry
2007-09-09 15:22 ` anon
2007-09-09 16:03 ` Markus E L
2007-09-10 0:05 ` Larry Kilgallen
2007-09-10 3:10 ` Markus E L
2007-09-09 16:05 ` Markus E L
2007-09-09 18:40 ` Ed Falis
2007-09-09 19:11 ` Markus E L
2007-09-09 10:57 ` Gautier
2007-09-09 14:49 ` anon
2007-09-09 15:08 ` Pascal Obry
2007-09-09 15:38 ` Markus E L
2007-09-09 19:12 ` Niklas Holsti
2007-09-09 19:28 ` Ed Falis
2007-09-10 12:51 ` Colin Paul Gloster
2007-09-07 1:38 ` Steve
2007-09-07 2:47 ` Robert A Duff
2007-09-05 7:46 ` Dmitry A. Kazakov
2007-09-05 8:17 ` brodax
2007-09-05 8:30 ` Jean-Pierre Rosen
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox