On Wed, 2006-04-26 13:09:38 -0700, Linus Torvalds <[email protected]> wrote: > On Wed, 26 Apr 2006, Jan-Benedict Glaw wrote: > > There's one _practical_ thing you need to keep in mind: you'll either > > need 'C++'-clean kernel headers (to interface low-level kernel > > functions) or a separate set of headers. > > I suspect it would be easier to just do > > extern "C" { > #include <linux/xyz.h> > ... > } > > instead of having anything really C++'aware in the headers. ...but you need to admit that your left hand tried to make your right hand not typing this, didn't it? > - the language just sucks. Sorry, but it does. > - some of the C features we use may or may not be usable from C++ > (statement expressions?) In the constructor pathes, I expect higher stack usage than we now have. > - a lot of the C++ features just won't be supported sanely (ie the kernel > infrastructure just doesn't do exceptions for C++, nor will it run any > static constructors etc). So what actually can be made useable (and what actually makes sense): * Classes with public and private funct^Wmembers, constructors. * Namespaces? Don't think they're all _that_ useful for us. * Static constructors probably won't fly. > Anyway, it should all be doable. Not necessarily even very hard. But I > doubt it's worth it. I guess if somebody has a large portion of well-separated C++ code (eg. a complete and complex filesystem), it would be easier to write some glue code to "run" the C++ code with the kernel. Though it would be even easier to use FUSE's bindings:-) MfG, JBG -- Jan-Benedict Glaw [email protected] . +49-172-7608481 _ O _ "Eine Freie Meinung in einem Freien Kopf | Gegen Zensur | Gegen Krieg _ _ O für einen Freien Staat voll Freier Bürger" | im Internet! | im Irak! O O O ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));
Attachment:
signature.asc
Description: Digital signature
- References:
- RE: C++ pushback
- From: Matthew Frost <[email protected]>
- RE: C++ pushback
- From: "David Schwartz" <[email protected]>
- Re: C++ pushback
- From: Jan-Benedict Glaw <[email protected]>
- Re: C++ pushback
- From: Linus Torvalds <[email protected]>
- RE: C++ pushback
- Prev by Date: Re: Linux 2.6.17-rc2 - notifier chain problem?
- Next by Date: Re: [uml-devel] Re: [RFC] PATCH 3/4 - Time virtualization : PTRACE_SYSCALL_MASK
- Previous by thread: Re: C++ pushback
- Next by thread: RE: C++ pushback
- Index(es):