How to program fine-grained real-time concurrent applications in C or Ada

Peter Dufault dufault at hda.com
Thu Dec 24 18:07:38 UTC 2020


If you want to prototype on Linux/Unix you should use the POSIX/POSIX threads (pthreads) interface.  I use the POSIX interface for portability and testing.  I don't think there is much of a performance impact of using the RTEMS POSIX versus the RTEMS Classic API versus portability.  The priorities need to be re-mapped between POSIX and RTEMS Classic, and I'm sure there is similar overhead, but I don't think it adds up to that much.  A lot may be setup.

> On Dec 24, 2020, at 12:30 , Joel Sherrill <joel at rtems.org> wrote:
> 
> You missed all the directives that use ticks in the Classic API. There is rtems_task_wake_after for one. Almost every service that had a delay or timeout is in ticks. The length of a tick is configurable in microseconds.
> 
> POSIX has different services and specifies time intervals and delays differently. See clock_nanosleep for an example where you can even pick the clock source.
> 
> --joel
> 
> On Thu, Dec 24, 2020, 5:13 AM Karel Gardas <karel.gardas at centrum.cz> wrote:
> 
> I'd try to use POSIX API and POSIX timers. Look into testsuites/psx* tests.
> 
> Cheers,
> Karel
> 
> On 12/24/20 11:24 AM, Mattia Bottaro wrote:
> > Hi everyone, newbie RTEMS here.
> >
> > I need to develop a multitasking real-time application with RTEMS
> > (preferably in Ada, but also C solutions are welcomed). I see that I can
> > use the Classic API
> > <https://docs.rtems.org/branches/master/c-user/index.html>, but they are
> > unsuitable to my purposes. As you can read here
> > <https://docs.rtems.org/branches/master/c-user/task/directives.html#task-wake-when-wake-up-when-specified>,
> > the  rtems_task_wake_when directive is too coarse: "The timing
> > granularity of this directive is a second.".
> > I need to work with microseconds-granularity and I cannot find how to do it.
> >
> > Thanks in advance.
> >
> > _______________________________________________
> > users mailing list
> > users at rtems.org
> > http://lists.rtems.org/mailman/listinfo/users
> >
> 
> _______________________________________________
> users mailing list
> users at rtems.org
> http://lists.rtems.org/mailman/listinfo/users
> _______________________________________________
> users mailing list
> users at rtems.org
> http://lists.rtems.org/mailman/listinfo/users

Peter
-----------------
Peter Dufault
HD Associates, Inc.      Software and System Engineering

This email is delivered through the public internet using protocols subject to interception and tampering.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 235 bytes
Desc: Message signed with OpenPGP
URL: <http://lists.rtems.org/pipermail/users/attachments/20201224/520805b6/attachment.bin>


More information about the users mailing list