[Click] C++ vs the kernel

Adam M click at irotas.net
Mon Jul 23 19:56:59 EDT 2007


Hi folks,

I'm a little confused regarding the documentation for the
'click-devirtualize' tool:

"The click-devirtualize tool speeds up a Click configuration by removing
virtual function calls from its elements. ... The virtual function calls
in this specialized C++ code are replaced with direct function calls to
other elements in the configuration. ... You can install such an archive
into the linuxmodule Linux kernel module with click-install"

This is all well and good, but there seems to be a lot of unaddressed
issues here. I'm certainly no Linux kernel expert, but it seems there
would be a lot of "gotchas". Here's a few that I can think of off the
top of my head:
1) Name mangling
2) Exceptions
3) Memory allocation
4) Threading
5) Dynamic loading

I would expect that these gotchas would be well documented somewhere,
with advice on how to write C++ code that will link with the kernel, but
I've not really found anything.

It seems that Click has been quite successful at writing C++ code that
will link with the kernel, but I don't know how people have accomplished
this.

Could someone please shed some light? If there's already extensive
documentation for this, a simple reference is fine. Otherwise, some
tutelage may be necessary.

Thanks again,
Adam


More information about the click mailing list