[etherlab-users] Usage of EtherCAT-Master Userspace-library breaks hard realtime execution under RTAI/LXRT

Andreas Stewering-Bone Andreas.Stewering-Bone at gmx.de
Wed Apr 14 16:38:38 CEST 2010


Hi,

The userspace API is based on linux ioctl's. So if you want to use it under 
lxrt or xenomai userspace you will have to write a rtdm-driver for the 
userspace API. 
You will have to use the rtdm-ioctl's.

Greatings

Andreas


Am Wednesday 14 April 2010 15:13:21 schrieb Florian Pose:
> Hi,
>
> On Tue, Apr 06, 2010 at 05:50:48PM +0200, Jürgen Kunz wrote:
> > There are two points which are breaking realtime
> > execution under rtai/lxrt: 1. using ioctl (see
> > http://www.rtai.dk/cgi-bin/gratiswiki.pl?LXRT_FAQs) and 2. using kernel
> > semaphores to lock the above mentioned kernel function calls, which are
> > not locked if they are used in kernel space directly. I commented out
> > the usage of the kernel semaphores in the relating ioctl-functions in
> > kernel space, but that makes no difference that the hard-realtime-thread
> > is pushed back to soft realtime execution.
> > So, why are kernel semaphores being used here? It is mentioned in the
> > documentation that usage of standard kernel semaphores are not
> > sufficient for providing a correct locking mechanism if realtime
> > extensions like rtai and xenomai are used and so the application which
> > has requested the master has to provide the appropriate locking
> > mechanism. Does an implementation of the kernel calls exist which can
> > guarantee hard realtime execution in user space? Or do I have to
> > implement the corresponding LXRT-calls by myself?
>
> the user-space library is not designed for the use with LXRT etc.. The
> kernel itself has to be realtime-capable (for example with RT-PREEMPT).
> I heard of people who wrote a wrapper layer for ethercat API functions,
> but for an older interface version.
>
> If you really want tu use the userspace API via LXRT, you have to
> implement this kind of wrapper class to avoid the ioctl() calls.





More information about the Etherlab-users mailing list