[bitlug] Writing kernel modules in C++

  • From: Turuvanur Pavan-A20404 <pavan.tc@xxxxxxxxxxxx>
  • To: "Bitlug (E-mail)" <bitlug@xxxxxxxxxxxxx>
  • Date: Mon, 5 Jul 2004 16:19:50 +0530

Hi all,

The topic is not so well taken among kernel developers, when it comes 
to writing a kernel module in C++.
But sometimes, you might have to. Currently, my official work has
something to do with this. I thought it might be useful to ppl out here
if i share my expieriences. I'm starting off now, and my progress will
be reflected on the list. Queries and suggestions are welcome. Lets
make the most of it and make it a healthy discussion.

First of all, just for the kicks, take a look at this ;)
http://www.uwsg.iu.edu/hypermail/linux/kernel/0402.0/0041.html

Here is some talk about the why and why nots :
http://www.kernel.org/pub/linux/docs/lkml/#s15-3

And this is something which has already been done:

www.pdos.lcs.mit.edu/click
They have managed to come up with a C++ kernel module.
Download the code and take a look at it. If you are not using cscope or
a similar tool, please resort to it as early as possible. Life seems
much simpler with these, when browsing through huge amounts of code.

At the end of this thread, we should successfully be able to load a
c++ module into the kernel. 

TC

PS: Any questions on anything not known, are welcome.
    good candidates : What is a kernel module?
                      What is insmod-ing?

Other related posts: