Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Apr 2005 20:32:57 -0600 (MDT)
From:      "M. Warner Losh" <imp@bsdimp.com>
To:        opensource.enthousiat@gmail.com
Cc:        hackers@freebsd.org
Subject:   Re: KLD module with C++ iostreams ?
Message-ID:  <20050420.203257.69059150.imp@bsdimp.com>
In-Reply-To: <37e1316605042019072b5d7a0e@mail.gmail.com>
References:  <37e1316605042019072b5d7a0e@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
In message: <37e1316605042019072b5d7a0e@mail.gmail.com>
            Aziz KEZZOU <opensource.enthousiat@gmail.com> writes:
: Hi hackers,
: I am wondering if I can use c++ iostreams inside the kernel ?
: After all the code : cout << "Hello world!" << endl; 
: ends accessing the stdout just like : printf("Hello world!\n"); right ?

Just like, yes.  Exactly the same thing as, no.  The details matter
here.  There's a lot of code to make this happen.

: So if I could compile my KLD module with static linkage to libstdc++,
: that should be ok, right ?

No.

: Any one did or knows how to do this ?

I've done C++ in the kernel before.  IT is realtively easy to get very
basic functioanlity.  You won't have streams, exceptions, etc.
However, to have all the features of C++ would take a lot of work.

Warner




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050420.203257.69059150.imp>