GNAT/RTEMS

Joel Sherrill joel.sherrill at OARcorp.com
Fri Jan 24 14:20:05 UTC 2003



Steve wrote:
> 
> ----- Original Message -----
> From: "Joel Sherrill" <joel.sherrill at OARcorp.com>
> To: <Mark.Hann at scisys.co.uk>
> Cc: <rtems-users at OARcorp.com>
> Sent: Tuesday, January 21, 2003 6:38 AM
> Subject: Re: GNAT/RTEMS
> [snip]
> > I have seen people run into is having non-Ada tasks call Ada routines
> > when the task is not at a valid Ada priority.  [Remember Ada's 32
> > priorities
> > are mapped onto a range of POSIX threads priorities so it is possible
> > for
> > a POSIX thread to have priorities above and below valid Ada task
> > priorities.]
> > This can violate the priority ceiling on some of the Ada run-time
> > mutexes.
> 
> I don't understand why Ada's 32 priorities are mapped to a range of POSIX
> thread priorities.  Is this something special about the GNAT implementation?

Most GNAT ports end up with each Ada task being implemented as an OS
task/thread with certain scheduling attributes set.  Each Ada task is 
ultimately a native thread of some type.  FOr RTEMS each Ada task is
implemented as a POSIX thread.  For Linux, you have two choices "FSU
pthreads"
or "kernel threads".  

When the native threads have more priorities than Ada requires, the
Ada task priorities must be mapped somehow onto the native task
priorities.

> The only thing I see in the LRM about priorities is in D.1.26 indiciating
> that System.Priority shall include at least 30 values.

This isn't directly an LRM issue.  GNAT meets that requirement.  It is a
characteristic of the GNAT run-time implementation.  

> Steve
> (The Duck)
> 
> [snip]
> >
> > --
> > Joel Sherrill, Ph.D.             Director of Research & Development
> > joel at OARcorp.com                 On-Line Applications Research
> > Ask me about RTEMS: a free RTOS  Huntsville AL 35805
> > Support Available                (256) 722-9985
> >

-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel at OARcorp.com                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
Support Available                (256) 722-9985



More information about the users mailing list