From owner-freebsd-arch@FreeBSD.ORG Tue Oct 30 17:37:36 2007 Return-Path: Delivered-To: freebsd-arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 581CA16A46C; Tue, 30 Oct 2007 17:37:36 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 11D4B13C4B0; Tue, 30 Oct 2007 17:37:35 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id 1135D1A4D84; Tue, 30 Oct 2007 10:37:35 -0700 (PDT) Date: Tue, 30 Oct 2007 10:37:35 -0700 From: Alfred Perlstein To: Bakul Shah Message-ID: <20071030173734.GV33488@elvis.mu.org> References: <20071030055840.GS33488@elvis.mu.org> <20071030163613.E70665B30@mail.bitblocks.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20071030163613.E70665B30@mail.bitblocks.com> User-Agent: Mutt/1.4.2.3i Cc: Poul-Henning Kamp , Garance A Drosehn , freebsd-arch@FreeBSD.org Subject: Re: C++ in the kernel X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Oct 2007 17:37:36 -0000 * Bakul Shah [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