On Tue, Nov 27, 2001 at 12:10:11PM +0100, Ivan Martinez wrote:
> On Friday 23 November 2001 18:19, Victor Yodaiken wrote:
> > RTLinux and Linux provide no support for C++ in modules - so it's not
> > accurate to describe this as a "bug". The Linux developers have been
> > very clear on _not_ facilitating use of C++ in kernel modules and we
> > have not done the work to provide a generic work around. Of course,
> > patches are welcome.
>
> That's a surprise for me. Then, you just don't guarantee the realtime C++
> stuff to work?.
Nope. We have made it work at several times in the past, but it requires
a pretty high level of maintainence. And this subject regularly
pops up on the Linux list where the kernel developers nearly unanimously
oppose any support.
On a larger issue, we don't guarantee the GPL code.
The GPL RTLinux is _community supported_ - FSM does some quality control,
some bug fixes, and some continuing development, but the GPL model
requires either an active user community contributing code back to the
project, sponsors, or a pioneer spirit.
> > > - Posix I/O: It seems using Posix I/O in realtime modules requires
> > > hacking RTLinux files. Instead of that, such I/O interface won't be used
> > > at the moment. This means that rtf_get and rtf_put must be used to read
> > > and write realtime fifos in the methods RTFifoRead and RTFifoWrite.
> >
> > POSIX I/O works and requires no hacking of RTLinux modules as far as I
> > know.
> >
> > It may be that you are seeing problems in 3.0 that were fixed
> > in 3.1
>
> No, I'm using 3.1. The problem is I can't link rtl_posixio.h, not even with
> extern "C". As I said in my "Still... how can I intlude unistd.h in C++
Ok. So it may be accurate to say:
POSIX I/O seems to clash with C++.
The problem comes from the Linux interface include files that are dragged in
and clash with C++ keywords. The example you give fails because Linux
defines a "new" function - ok in C, not ok in C++.
Since when this comes up on the LKL, one
gets comments like:
"C++ is just a syntax wrapper over C with some bad exception handling
included. It doesn't even do a good job on object orientation compared
to stuff like smalltalk. People do object oriented programming in cobol.
Its a programmer feature not a language feature."
(Alan Cox)
it's unlikely that much will happen.
A c++ interface to RTL is much easier than one for Linux since it simply
requires defining interface headers that can be used without going into
Linux headers. And for RTL/NetBSD this is much less of a problem.
But I have some of the same reservations as the Linux
developers - this is a dangerous path to follow in which C++isms will
creep into core system functionality.
> Last solutions I was given were hacking&patching everywere, that's why I
> concluded there is a bug.
Nah, just a nonsupported feature without a maintainer. Volunteers are
welcomed.
-- [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/