Fri, 29 Sep 2000 Nicolas FLORIAN wrote:
> >%_Hi,
>
> I've understand why I couldn't compile my program, but now I've got
> another problem.
>
> I took the compilation options which where in the rtl.mk file, and I put
> them into Kdevelop. Then, when I compiled the program (I'm trying to
> change an old application), I had many errors related to the included
> files (rtl.h, ...). then , I tried to compile a part of the program
> (init_module, ...) without the old included files (stdio.h, ...) and it
> worked. So, is there an incompatibility between these files ?
Yes; you can't use (most of) the standard libraries in kernel space, as they
use syscalls for I/O and other stuff. You can only use libraries that don't
rely on anything you can't link into your module and run in kernel space.
> And now, how can I replace the files which are incompatible ? For
> example, termios.h, sys/types.h, sys/stat.h, ...
You have to dig in the RTL headers for the functions you need, and possibly the
kernel headers. Be careful with the latter though, as most of the standard
Linux kernel calls can't safely be used from within RTL threads or ISRs!
If you need to do I/O (terminal, file etc...), you have to use either user
space threads (recommended), bottom halves (cannot sleep AFAIK) or kernel
threads (should work, but different API - look at some kernel HTTP server or
something for examples) to do it - accessing those subsystems from within RTL
will crash the system.
David Olofson
Programmer
Reologica Instruments AB
[EMAIL PROTECTED]
..- M u C o S --------------------------------. .- David Olofson ------.
| A Free/Open Multimedia | | Audio Hacker |
| Plugin and Integration Standard | | Linux Advocate |
`------------> http://www.linuxdj.com/mucos -' | Open Source Advocate |
..- A u d i a l i t y ------------------------. | Singer |
| Rock Solid Low Latency Signal Processing | | Songwriter |
`---> http://www.angelfire.com/or/audiality -' `-> [EMAIL PROTECTED] -'
-- [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/