In short, you can't open a file or device in kernel space.  You have to open
it in a user-space task and then open an RT-FIFO between the user-task and
your module.  You can then put all of the data to be written/transmitted
into the FIFO in the module and
get in user-space where it's easy to deal with.

        Norm

> -----Original Message-----
> From: Bertrand Croq [SMTP:[EMAIL PROTECTED]]
> Sent: Tuesday, June 27, 2000 9:41 AM
> To:   [EMAIL PROTECTED]
> Subject:      [rtl] Opening a device
> 
> Hi,
>   I don't know if my problem is specific to RTLinux (I don't think so),
> but maybe someone has an answer: I want to use RTLinux to write data to
> a device (/dev/ttyI*). So I write a module that create a "periodic"
> thread; in this thread, I try to open the device, but the open()
> function always tells me "bad file or directory"... I have tried with a
> simple file and I also get the error!
>   This is the first time I write a kernel module and I don't really know
> what functions can be used and when, so I would like to know how to open
> a file/device while in kernel space.
> 
> Thanks in advance.
> 
> - Bertrand Croq
> 
> -- [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/
-- [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