DIAPM-RTAI
(Dipartimento di
Ingegneria
Aerospaziale,
Politecnico di
Milano
Real
Time
Application
Interface)
A Hard Real Time support for LINUX
This document explains how to call the functions available in the RTAI
developed at DIAPM.
Functions provided by rtai_sched module
Task functions:
rt_task_init
rt_task_init_cpuid
rt_task_delete
rt_task_make_periodic
rt_task_make_periodic_relative_ns
rt_task_wait_period
rt_task_yield
rt_task_suspend
rt_task_resume
rt_busy_sleep
rt_sleep
rt_sleep_until
rt_get_task_state
rt_whoami
rt_task_signal_handler
rt_set_runnable_on_cpus
rt_set_runnable_on_cpuid
rt_task_use_fpu
rt_linux_use_fpu
rt_preempt_always
rt_preempt_always_cpuid
Timer functions:
Semaphore functions:
rt_sem_init
rt_sem_delete
rt_sem_signal
rt_sem_wait
rt_sem_wait_if
rt_sem_wait_until
rt_sem_wait_timed
Mailbox functions:
Message handling functions:
RPC (Remote Procedure Call) functions:
rt_rpc
rt_rpc_if
rt_rpc_until
rt_rpc_timed
rt_isrpc
rt_return
Functions provided by rtai module
Following there are some function calls, to be used from
Rtai tasks, for managing interrupts within Rtai and communication services
between Rtai tasks and Linux processes.
RTAI service functions:
Functions provided by rtai_fifos module
RTAI FIFO communication functions (these are a modification
of RT-FIFO devices developed by Michael Barabanov for
NMT_RTLinux):
In Linux RTL fifos have to be created by
mknod /dev/rtf<x> c 63 <x>
where <x>
is the minor device number, from 0 to 63; thus
on the Linux side RTL fifos can be used as standard character devices.
RTAI FIFO semaphore functions:
Called from RT task
|
| Called from Linux process
|
rtf_sem_init |
|
rtf_sem_init |
rtf_sem_post |
|
rtf_sem_post |
|
|
rtf_sem_wait |
rtf_sem_trywait |
|
rtf_sem_trywait |
|
|
rtf_sem_timed_wait |
rtf_sem_destroy |
|
rtf_sem_destroy |
RTAI FIFO auxiliary functions:
rt_printk
rt_print_to_screen
The distribution contains some examples on how to use
the above described services in subdirectories of directory examples.
Document written by: E. Bianchi, L. Dozio, P. Mantegazza.
Dipartimento di Ingegneria Aerospaziale
Politecnico di Milano
e-mail: mantegazza@aero.polimi.it
e-mail: dozio@aero.polimi.it
Revised and updated by Gábor Kiss
Computer and Automation Institute
of Hungarian Academy of Sciences