Date: Sat, 27 Oct 2007 12:07:38 -0700 From: "Ali Mashtizadeh" <mashtizadeh@gmail.com> To: frank@exit.com Cc: Bruce M Simpson <bms@incunabulum.net>, freebsd-arch@freebsd.org Subject: Re: C++ in the kernel Message-ID: <440b3e930710271207s2a615817v7a68538bd37092c7@mail.gmail.com> In-Reply-To: <1193505031.3656.8.camel@jill.exit.com> References: <4722BDBE.5030408@incunabulum.net> <1193505031.3656.8.camel@jill.exit.com>
next in thread | previous in thread | raw e-mail | index | archive | help
The Mac OS X I/O Kit has a fairly clean interface. I actually added a bit of C++ support to my own FreeBSD Kernel a while back. If you drop exceptions and RTTI it's fairly easy to implement. I didn't put much effort into making any C++ API for drivers. I just used it so I could have object oriented code in the backend of a drivers. I think it's not really worth it in most cases. The L4 microkernel (http://l4ka.org/) has versions of its Kernel written in C++ and they make extensive use of templates. That is probably the most successful use of C++ in a Kernel I've seen. Ali On 10/27/07, Frank Mayhar <frank@exit.com> wrote: > > On Sat, 2007-10-27 at 05:25 +0100, Bruce M Simpson wrote: > > I was wondering if anyone had done any further thinking about this. > > Have you looked at the Mac OSX I/O Kit? It's entirely C++ (with some > pretty stringent restrictions) and is really only used for device > discovery. As far as I'm concerned, it's just about the only > appropriate use for C++ in the kernel and I would drop my support even > for that if I were introduced to something better. I haven't yet looked > at K. > -- > Frank Mayhar frank@exit.com http://www.exit.com/ > Exit Consulting http://www.gpsclock.com/ > http://www.exit.com/blog/frank/ > http://www.zazzle.com/fmayhar* > _______________________________________________ > freebsd-arch@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-arch > To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org" > -- Ali Mashtizadeh علی مشتی زاده
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?440b3e930710271207s2a615817v7a68538bd37092c7>
