Date: Sun, 18 Jun 2000 22:44:13 -0600 From: Warner Losh <imp@village.org> To: Dave Preece <dave.preece@kbgroup.co.nz> Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Quickie: C++ statically linked into kernel? Message-ID: <200006190444.WAA53529@harmony.village.org> In-Reply-To: Your message of "Mon, 19 Jun 2000 16:26:45 %2B1200." <67B808B0DD93D211ABEE0000B498356B02BCC0@internet.kbgroup.co.nz> References: <67B808B0DD93D211ABEE0000B498356B02BCC0@internet.kbgroup.co.nz>
next in thread | previous in thread | raw e-mail | index | archive | help
In message <67B808B0DD93D211ABEE0000B498356B02BCC0@internet.kbgroup.co.nz> Dave Preece writes: : I'm writing some C++ code that currently uses divert sockets off the : firewall and for performance reasons moving the code kernel mode is looking : like a (long term) good idea. : : The question is: Should I bite the bullet and start writing in pure C now : (and therefore save pain later)? Can I just provide an API using extern "C" : and link it in (with some calling functions in ipfw.c, of course)? Would an : lkm be the best way to go? I've run C++ code in the kernel. You couldn't easily use: templates, exceptions, global ctors, and sometimes you had to be careful with automatic instantiation of things. I implemented only new and delete and was able to get sample code to run in the kernel. I punted at that point due to the pain in actually knowing if these things were being used or not. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200006190444.WAA53529>