kern/99979: Get Ready for Kernel Module in C++
pfgshield-freebsd at yahoo.com
pfgshield-freebsd at yahoo.com
Tue Jul 11 19:26:11 UTC 2006
FWIW and just IMHO;
I think it would be really nice to have the IOKit, or a lookalike that uses
kobj(), available on FreeBSD. Another interesting experiment that I've
mentioned before is OpenBFS:
http://www.bug-br.org.br/openbfs/index.phtml?section=development
"OpenBFS, as all file systems under BeOS, is being developed as a kernel
add-on. Unlike all other file systems (and kernel add-ons in general), it is
being developed in C++. Contrary to popular belief, it is possible to use C++
in the kernel provided you play by the book and follow some rules:
- No exceptions
- (Almost) no virtuals (well, the Query code in OpenBFS uses them)
- It's basically only the C++ syntax, and type checking
- Since one tend to encapsulate everything in classes, it has a slightly higher
memory overhead
This is acceptable as we get some benefits out of it:
- Nicer code
- Easier to maintain
"
cheers,
Pedro.
Chiacchiera con i tuoi amici in tempo reale!
http://it.yahoo.com/mail_it/foot/*http://it.messenger.yahoo.com
More information about the freebsd-hackers
mailing list