News Archive (1999-2012) | 2013-current at LinuxGizmos | Current Tech News Portal |    About   

4th RTL Workshop: Yet Another RTAI Interface

Dec 19, 1997 — by LinuxDevices Staff — from the LinuxDevices Archive — views

Abstract

The described library is a software level that enables modules to run either in user-space (POSIX threads) or real-time (RTAI tasks), without filling up the code of ifdef and forcing a well-defined code structure. It is different from LXRT: here we twice compile the same source code in order to obtain a user space executable and a kernel module. The library provides a software abstraction for: threads, semaphores, memory allocation, timing, fifo-byte-queues (memory ring buffers, named pipes, rtai fifos and tcp/ip sockets). Moreover threads/tasks needs to be structured in a strict way: each thread/task must provide five callbacks, init(), start(), step(), stop() and destroy(). Each callback must return, no infinite loops allowed. The timing source in user space is the operating system clock. In real time you can choose among the RTAI timing, one interrupt (say IRQ 7), one PCI timing source. 1) What you loose You won't be able to use the full POSIX and RTAI interfaces. And in user space you won't be able to write your main() function. 2) What you gain You gain a known-to-work structure to start from. You gain the ability to run the same source code in user space and in real time. You can less painfully debug an algorithm in user space and then try it in real time. 3) Past to present The library was developed for a numerical control for a laser cutting machine, with timings of 30 ms in user space and 0.1 ms in real time. The timing source is the same PCI servo board used to control the motors. 4) Future The process of releasing it with GNU General Public License is in progress.

(Paper not available)

 
This article was originally published on LinuxDevices.com and has been donated to the open source community by QuinStreet Inc. Please visit LinuxToday.com for up-to-date news and articles about Linux and open source.



Comments are closed.