condition oddities

Ignacio García Pérez iggarpe at terra.es
Thu Jan 22 11:21:34 CET 2004


> > I have a problem that is actually more of a pthread problem
> than rtai, but
> > since I assume most of you programming under RTAI have also programmed
> > pthreads in user mode, perhaps someone could shed some light. Thanks in
> > advance and sorry if this is considered off-topic. I must say I
> have posted
> > about this is several other pthreads related places getting no
> response at
> > all.
> >
> > I want some code to execute every 100ms.
>
> Before going on reading you must state what every 100ms means, i.e. hard
> real time or just more or less paced with that time? That means: is it
> enough to have 100ms scheduled by Linux? If it si not then there might
> be the need to use LXRT.

It is soft real time:

The processing must be done at

t = t0 + 100ms * N

And an error of, say, 20ms is acceptable.



I must use a timing function with absolute time. I cannot use a simple sleep
because:

t = t0 + (100ms + tp) * N

tp = processing time.

Even if tp = 1us, the error adds up to 50ms after 50000 steps, which is not
acceptable.



Nacho.
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.563 / Virus Database: 355 - Release Date: 17/01/2004


---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.563 / Virus Database: 355 - Release Date: 17/01/2004

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.563 / Virus Database: 355 - Release Date: 17/01/2004





More information about the Rtai mailing list