* Gnat and priority level
@ 2004-10-19 9:00 mferracini
2004-10-19 9:57 ` Martin Krischik
2004-10-19 9:58 ` Alex R. Mosteo
0 siblings, 2 replies; 6+ messages in thread
From: mferracini @ 2004-10-19 9:00 UTC (permalink / raw)
Hi, i'm new on ada and i have many problem... :)
i need an info:
Ada.Text_Io.Put(Item => Integer'image(System.Priority'Last));
and gnat on windows2000 replay "30"
but i need more level of priority (255): how i can do?(if i can, of
course)
thanks
maurizio
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Gnat and priority level
2004-10-19 9:00 Gnat and priority level mferracini
@ 2004-10-19 9:57 ` Martin Krischik
2004-10-19 9:58 ` Alex R. Mosteo
1 sibling, 0 replies; 6+ messages in thread
From: Martin Krischik @ 2004-10-19 9:57 UTC (permalink / raw)
mferracini wrote:
> Hi, i'm new on ada and i have many problem... :)
>
> i need an info:
> Ada.Text_Io.Put(Item => Integer'image(System.Priority'Last));
> and gnat on windows2000 replay "30"
>
> but i need more level of priority (255): how i can do?(if i can, of
> course)
You can't do more the the OS or tasking layer got to offer. The only option
left it to map the 255 levels you want to use to the 32 (0..31, 31=
Interrupt) available.
With Regards
Martin
--
mailto://krischik@users.sourceforge.net
http://www.ada.krischik.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Gnat and priority level
2004-10-19 9:00 Gnat and priority level mferracini
2004-10-19 9:57 ` Martin Krischik
@ 2004-10-19 9:58 ` Alex R. Mosteo
2004-10-19 10:21 ` mferracini
1 sibling, 1 reply; 6+ messages in thread
From: Alex R. Mosteo @ 2004-10-19 9:58 UTC (permalink / raw)
mferracini wrote:
> Hi, i'm new on ada and i have many problem... :)
>
> i need an info:
> Ada.Text_Io.Put(Item => Integer'image(System.Priority'Last));
> and gnat on windows2000 replay "30"
>
> but i need more level of priority (255): how i can do?(if i can, of
> course)
You can't (at least easily). Not only the gnat implementation uses just
32 priorities, but these are mapped to underlying windows priorities,
which are only 7, if I remember correctly (yes, there's overlapping).
Take a look at the spec of System for more details.
If you need to play with real time semantics in gnat, be prepared to
have only 6 priorities (plus interruptions) and don't forget to specify
the ceiling locking policy, since that causes the executable to be put
in the windows real time priority class. Failing to do so, the dynamic
priorities of windows regular processes will screw up any attempt to
test tasking priorities semantics.
Cheers!
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Gnat and priority level
2004-10-19 9:58 ` Alex R. Mosteo
@ 2004-10-19 10:21 ` mferracini
2004-10-19 11:18 ` Alex R. Mosteo
0 siblings, 1 reply; 6+ messages in thread
From: mferracini @ 2004-10-19 10:21 UTC (permalink / raw)
>You can't (at least easily). Not only the gnat implementation uses
just
>32 priorities, but these are mapped to underlying windows priorities,
>which are only 7, if I remember correctly (yes, there's overlapping).
and with Linux rt version like RT-Linux there are the some problem?
thanks again.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Gnat and priority level
2004-10-19 10:21 ` mferracini
@ 2004-10-19 11:18 ` Alex R. Mosteo
2004-10-19 11:50 ` Jerome Hugues
0 siblings, 1 reply; 6+ messages in thread
From: Alex R. Mosteo @ 2004-10-19 11:18 UTC (permalink / raw)
mferracini wrote:
>>You can't (at least easily). Not only the gnat implementation uses
>
> just
>
>>32 priorities, but these are mapped to underlying windows priorities,
>>which are only 7, if I remember correctly (yes, there's overlapping).
>
>
> and with Linux rt version like RT-Linux there are the some problem?
> thanks again.
Take the following with a grain of salt, since I'm much less experienced
with gnat for linux.
Firstly, I think that gnat doesn't target the RT capabilities of
RT-Linux, so you'll really have regular non-RT linux threads. Unless
someone has a patch for it.
Second, you can choose two threading implementations with gnat for linux:
* linux native threads, whose particularities I don't know but some
linux expert could tell you (BTW, using the old 2.4 thread
implementation, not the new 2.6 one).
* fsu-threads (I think) which if I remember correctly are
POSIX-compliant or something-else-compliant which native linux's aren't.
Those have the particularity that you have a single linux process, so a
blocking call in any fsu-thread will block all the others (i.e. the
linux thread is blocked).
Someone more experienced can confirm these things? I'm interested in the
details too.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Gnat and priority level
2004-10-19 11:18 ` Alex R. Mosteo
@ 2004-10-19 11:50 ` Jerome Hugues
0 siblings, 0 replies; 6+ messages in thread
From: Jerome Hugues @ 2004-10-19 11:50 UTC (permalink / raw)
In article <4174F7FA.1020705@mailinator.com>, Alex R. Mosteo wrote:
> mferracini wrote:
> Firstly, I think that gnat doesn't target the RT capabilities of
> RT-Linux, so you'll really have regular non-RT linux threads. Unless
> someone has a patch for it.
There exists one project on this subject
http://bernia.upv.es/rtportal/apps/rtl-gnat/
Note that I've never tried it, so I cannot comment on which GNAT
version it uses, ACATS results, etc
> Second, you can choose two threading implementations with gnat for linux:
>
> * linux native threads, whose particularities I don't know but some
> linux expert could tell you (BTW, using the old 2.4 thread
> implementation, not the new 2.6 one).
>
> * fsu-threads (I think) which if I remember correctly are
> POSIX-compliant or something-else-compliant which native linux's aren't.
Strict Annex D (real time) compliancy
See
http://gcc.gnu.org/onlinedocs/gnat_ugn_unw/Choosing-between-Native-and-FSU-Threads-Libraries.html
for more details
HTH
--
Jerome
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2004-10-19 11:50 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-19 9:00 Gnat and priority level mferracini
2004-10-19 9:57 ` Martin Krischik
2004-10-19 9:58 ` Alex R. Mosteo
2004-10-19 10:21 ` mferracini
2004-10-19 11:18 ` Alex R. Mosteo
2004-10-19 11:50 ` Jerome Hugues
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox