C++ in the kernel

Alfred Perlstein alfred at freebsd.org
Tue Oct 30 10:37:36 PDT 2007


* Bakul Shah <bakul at bitblocks.com> [071030 09:36] wrote:
> 
> The structured macro paper referenced on the K wiki page also
> seems rather interesting.  A powerful macro facility needs to
> be well integrated with the language (much like Lisp or
> Scheme's macros) so that you can write for instance
> 
>     critical_section(lock) {
> 	...
> 	bar:
> 	...
> 	if (cond1) break;
> 	...
> 	if (cond2) goto foo;
> 	...
> 	if (cond3) goto bar;
> 	...
> 	if (cond4) return; // from enclosing function
> 	...
>     }
>     ...
>     foo:


do you mean like C++:

do {
	critical_object critical_instance();




}

?

Just wondering how much of this we want to roll on on our own.

-Alfred


More information about the freebsd-arch mailing list