Hi Dominique,

Dominique Micollet wrote:

> First question : when I consider the hello.c example, I don't clearly indentify the 
>parts of the driver which executes in the kernel mode (obviously init_module and 
>clean-up modules do) and which excecutes in the rtl mode : I guess start_routine does 
>after pthread_make_periodic_np : am I right ?
> 

Kernel mode: init_module, cleanup_modules
RT mode:     start_routine

pthread_create creates a real-time thread managed by the scheduler
(immediately runnable), pthread_make_periodic_np sets up a periodic mode
such that when you do a pthrad_wait_np you will block (give up the
processor to another RT task, or Linux if there are no more RT tasks)
until your time period has elapsed and you are ready to run again.

> Second question : is it possible to mix in the same driver parts executing in the 
>kernel mode and parts executing in the  rtl mode : I tried something like that but 
>the kernel seems to hang from time to time (may be a mistake in my programmation.

No, code running in RTL mode cannot (with a few exceptions) call kernel
code directly.  This should be done indirectly by pending system
requests, or using a user space proxy process.

> 
> Last question : I well understand communications between a process executing in the 
>user mode and a driver in the rtl mode, but is it possible to implement communication 
>between a driver in the rtl mode and a "process" or driver
> executing in the kernel mode ?

With care, you can do it.  If you use RT-fifo, the command handlers are
in kernel mode and so can make kernel calls.  Also you could use shared
memory using the mbuff driver.  


Regards, Stuart
-
Zentropix - A Lineo Company
-- [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