Thanks to those who sent corrections/suggestions.
 
 The table and API-differences below represent my current
understanding of RTL and RTAI. (which CAN BE WRONG) Please,
keep sending suggestions and corrections (send it to the 
list, so that other people can comment too).


  
    Guilherme
    
    
----------------------------------------------------------------------------
|     | I | S | Sched.  | S |Po-  |F   | Shr| FP | GPL | Ker-  | 486 | PPC |
|     | P | e |    |    | M | six | I  | Mem|    |     |  nel  |     |     |
|     | C | m |Per.| OS | P |     |  FO|    |    |     |       |     |     |
-------------------|--------------------------------------------------------
|     |   |   |    |    |   |     |    |    |    |     |       |     |     |
| RTL | o | o | w/ | w/ | n |  o  | y  | o  | y  |  y  | 2.0.x |  y  |  y  |
| v1  |   |   |8254|8254|   |     |    |    |    |     |       |     |     |
|     |   |   |    |    |   |     |    |    |    |     |       |     |     |
----------------------------------------------------------------------------
|     |   |   |    |    |   |     |    |    |    |     |       |     |     |
|     |   |   |    |    |   |     |    |    |    |     |       |     |     |
|     |   |   |    |    |   |     |    |    |    |     |       |     |     |
|     |   |   | w/ | w/ |   |     |    |    |    |     |       |     |     |
| RTL | o | o |    |8254| y |  o  | y  | o  | y  |  y  | 2.2.x |  n  |  y  |
| v2  |   |   |8254| +  |   |     |    |    |    |     |       |     |     |
|     |   |   |    |TSC |   |     |    |    |    |     |       |     |     |
|     |   |   |    |    |   |     |    |    |    |     |       |     |     |
|     |   |   |    |    |   |     |    |    |    |     |       |     |     |
----------------------------------------------------------------------------
|     |   |   |    |8254|   |     |    |    |    |     |       |     |     |
|     |   |   |    | in |   |     |    |    |    |     |       |     |     |
|     |   |   |    |UP -|   |     |    |    |    |     |       |     |     |
|     |   |   |    |SMP |   |     |    |    |    |     |       |     |     |
|     |   |   | w/ | &  |   |     |    |    |    |     |       |  y  |     |
| RTAI| y | y |    |MUP | y |  o  | y  | o  | y  |  y  | 2.2.x |     |  n  |
| v.6 |   |   |8254|    |   |     |    |    |    |     |       |(for |     |
|     |   |   |    |APIC|   |     |    |    |    |     |       |1 CPU|     |
|     |   |   |    | in |   |     |    |    |    |     |       |only)|     |
|     |   |   |    |SMP |   |     |    |    |    |     |       |     |     |
|     |   |   |    | &  |   |     |    |    |    |     |       |     |     |
|     |   |   |    |MUP |   |     |    |    |    |     |       |     |     |
----------------------------------------------------------------------------

 y - embeded in the RT modules
 n - not implemented
 o - optional (it can be "insmod'ed" separately)



API comparison
==============

set up peridic mode
------------------                 

RTL:
        RTIME task_ticks;
        task_ticks = (RT_TICKS_PER_SEC/FREQ);
        rtl_set_periodic_mode(task_ticks);

RTAI:           
        RTIME task_ticks;
        rt_set_periodic_mode(void);
        task_ticks = nano2count(1000000000/FREQ)
        start_rt_timer(task_ticks)


Tell Linux you will be using the FPU
--------------------------------------        

RTL:
        ??

RTAI:
        rt_linux_use_fp(1)


initialise a task
-----------------

RTL:
        rt_task_init(   RT_TASK *task,
                        void (*fn)(int),
                        int data,
                        int stack_size,
                        int priority )

        If it uses the FPU, add:

        rt_task_use_fp( RT_TASK *task, 1 )

RTAI:
        rt_task_init(   RT_TASK *task,
                        void (*fn)(int),
                        int data,
                        int stack_size,
                        int priority,
                        int uses_fpu,
                        void (*signal)(void) )
                                


set a (periodic) task running
-----------------------------

RTL/RTAI:
        
        rt_task_make_periodic( RT_TASK *task,
                                RTIME start_time_ticks,
                                RTIME period_ticks)


suspend a running task until the next tick
-------------------------------------------

RTL:
        rt_task_wait(void)

RTAI:
        rt_task_wait_period(void)



cleanup/stop a task
--------------------

RTAI:           stop_rt_timer(void)
RTL/RTAI:       rt_task_suspend(RT_TASK *task)
                rt_task_delete( RT_TASK *task)
  

create a fifo
--------------

RTL:
                rtf_create(unsigned int fifo, int fifo_size)
                          
RTAI:
                rtf_create_using_bh(unsigned int, int size, 0)

NOTE: both can be used with the simple rtf_create, but the behaviour is
different.  Under RTAI, a user task will only be woken up at the next
run of schedule (this is an intended feature).  To get the same effect
of waking up as soon as possible, use the above code.


put data to a fifo
-------------------

RTL/RTAI:
                rtf_put(unsigned int fifo, void *buf, int count)


get data from a fifo
----------------------

RTL/RTAI:
                rtf_get(usigned int fifo, void *buf, int count)



destroy a fifo
---------------

RTL/RTAI:
                rtf_destroy(usigned int fifo)



Filename comparison
===================

Another problem is the name and location of files. This means that
Makefiles and code has to be changed to locate the different include
files. 

Header names
-----------

RTL:
        rtl_fifo.h, rtl_sched.h

RTAI:
        rtai_fifos.h, rtai_sched.h

Note: in addition you must also include rtai.h first for RTAI.




           -------------< G. N. DeSouza >-------------
           ---------< [EMAIL PROTECTED]>---------
           --< http://rvl1.ecn.purdue.edu/~gnelson >--



--- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
----
For more information on Real-Time Linux see:
http://www.rtlinux.org/~rtlinux/

Reply via email to