From owner-freebsd-current@FreeBSD.ORG Mon Aug 3 17:10:45 2009 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3A385106566C; Mon, 3 Aug 2009 17:10:45 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 0CA3D8FC0A; Mon, 3 Aug 2009 17:10:45 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id B53F746B17; Mon, 3 Aug 2009 13:10:44 -0400 (EDT) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id E44B48A0A2; Mon, 3 Aug 2009 13:10:43 -0400 (EDT) From: John Baldwin To: freebsd-current@freebsd.org Date: Mon, 3 Aug 2009 13:05:25 -0400 User-Agent: KMail/1.9.7 References: <4A75691E.9070401@elischer.org> In-Reply-To: <4A75691E.9070401@elischer.org> MIME-Version: 1.0 Content-Disposition: inline Message-Id: <200908031305.25714.jhb@freebsd.org> Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Mon, 03 Aug 2009 13:10:43 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: Julian Elischer , FreeBSD Current Subject: Re: possible readability improvement for i386 pcpu macros: X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Aug 2009 17:10:45 -0000 On Sunday 02 August 2009 6:23:26 am Julian Elischer wrote: > > if you have to ever look at the output of the cpp then this removes a > number of things you have to puzzle over in the output of PCPU_SET() > and friends. > > > I don't know if it applies to the other architectures. It probably applies to amd64. Also, simplifying the amount of code the macros generate can reduce compile time. That is why Peter added __curthread() so that all the curthread references did not have to compile a fully expanded PCPU_GET() macro each time. It gave a noticable reduction in kernel compile time. -- John Baldwin