a little bit of c++ in kernel [module]

Andriy Gapon avg at icyb.net.ua
Wed Feb 11 05:40:31 PST 2009


on 10/02/2009 22:43 Aniruddha Bohra said the following:
> You can see Click: http://read.cs.ucla.edu/click/
> It does not  run on FreeBSD >4.
> I have an old diff which builds on the work by Marko Zec and Bruce
> Simpson, that allows me to load the click module.
> http://www.cs.rutgers.edu/~bohra/click-1.5.0.diff
> 

Aniruddha,

thank you very much for the feedback!
I looked through the code and the patch and I see the following:

1. options -fpermissive -fno-exceptions -fno-rtti are passed to c++ compiler
2. there are new/delete implementations that use kernel malloc

I think that #1 means that there are no exceptions, (non-trivial)
dynamic_cast and typeid for kernel c++ code.

The questions that I have left:

1. do you use any global/static objects with constructors? did you have
to write any code to call on those constructors when the module is loaded?
2. did you have to write any other run-time support code or platform
glue code (besides new/delete)?
3. I assume virtual inheritance can be used in kernel code? do you use it?

Thank you again!

-- 
Andriy Gapon


More information about the freebsd-hackers mailing list