Re: Linux kernel modules development in C++

From: Timur Tabi (ttabi@interactivesi.com)
Date: Wed Sep 27 2000 - 15:27:17 EST


** Reply to message from Horst von Brand <vonbrand@inf.utfsm.cl> on Wed, 27 Sep
2000 15:31:51 -0400

> Your problem is that you can't use anything of C++ that needs runtime
> support inside the kernel (there goes new() and friends), exception
> handling is out of the question (bye, bye, throw() et al), and (in case you
> hadn't thought of it) libstdc++ is way out of line (no fancy data
> structures or algorithms).

So what? The same is true for any operating system, and that's why driver
programmers make their own runtime. That's what I did for OS/2, and it works
great. You just create your own versions of malloc() and free() and a bunch of
other small functions that the compiler expects to be present, and link it in.
I don't see the problem.

Practically every other OS supports drivers in C++. There's nothing wrong with
writing drivers in C++, you just need to write some runtime library routines.
Your making it sound as if C++ compilers emit tons of junk that won't work in
the kernel, and that's absurd.

Nothing needs to be changed in the kernel to support C++. You just need to
write a bunch of wrappers for everything in the kernel that you use, and that's
nothing new. C++ programmers are used to this, because that's how you call any
operating system API.

-- 
Timur Tabi - ttabi@interactivesi.com
Interactive Silicon - http://www.interactivesi.com

When replying to a mailing-list message, please don't cc: me, because then I'll just get two copies of the same message. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Sep 30 2000 - 21:00:20 EST