Re: comedi with real time

On Wed, 14 Aug 2002, Sagar Behere wrote:

> Hi,
>  The comedi website mentions that
>
> ----------------snip-----------
>
> Kcomedilib is a Linux kernel module (distributed with
> Comedi) that provides the same interface as Comedilib
> in kernel space, suitable for real-time tasks. It is
> effectively a "kernel library" for using Comedi from
> real-time tasks.
> ---------------snip----------
>
> So how exactly do I go about using Kcomedilib and
> getting real time performance ? Is it that I load
> Kcomedilib and then pretend that i am actually using
> comedi or what ? Or, since it has already detected

No, you need to write a kernel module that makes calls to the kcomedilib.o
symbols/functions.

> that I'm running RTAI, will it automatically switch to
> real-time code or something ?

No.  You need to create your own real-time thread/task in RTAI and then
any call you make to kcomedilib functions in your kernel module will be
realtime-compatible (meaning they won't block).


If kernel coding makes you nervous or you just don't like the idea of
having part of your application running in the kernel, you can use LXRT
(userspace realtime in RTAI), you don't really need to load kcomedilib.
I believe you can just use comedilib from user-space, and the ioctl()s it
does lead to kernel code that is realtime-compatible... (meaning it
doesn't block or call kernel functions that block).

-Calin

Received on 2002-08-16Z15:00:20