[fpc-devel] about realtime tasks

Stefan Kisdaroczi kisda at hispeed.ch
Wed Jan 18 12:31:30 CET 2006


Am Wednesday 18 January 2006 12:06 schrieb Vinzent Hoefler:
> On Wednesday 18 January 2006 10:30, Stefan Kisdaroczi wrote:
> > Its working so far, but using multiple tasks, there are some strange
> > effects (exceptions,hangs).
> > From the freepascal documentation:
> > "Although it is not forbidden to do so, it is not recommended to use
> > system-specific threading routines: ..."
>
> As far as I understand that it means you should not do that at the
> _application side_. There is a ThreadManager to abstract away these
> system specifics.
>
> > As far as I understood, I need to include the unit cthreads, which i
> > have done.
>
> Which AFAIK in turn uses the pthreads library. Which is probably not
> what you want.
I think I want that. The Xenomai library itself uses also libpthread. These 
realtime tasks are standard linux tasks, and are scheduled also by linux.
But they are pimped, so they can also be scheduled by the realtime nucleus. 
The tasks migrate between two schedulers, a very interesting thing :-)

> > When I include cthreads and (manually?) initialize the ThreadManager,
> > would it be ok ?
>
> I think you should "simply" write and install your own thread manager
> based on the (native or the RT-POSIX-threads) xenomai API and link to
> the xenomai library _instead_ of the libpthread.
For xenomai i need to link pthreads, as the xenomai library calls pthread 
functions.
But i will look at the Threadmanager.

thank you
kisda
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20060118/25c62174/attachment.sig>


More information about the fpc-devel mailing list